function games_deactivate()
{
global $db;
$db->query("DROP TABLE `".TABLE_PREFIX."games`,
`".TABLE_PREFIX."games_categories`,
`".TABLE_PREFIX."games_champions`,
`".TABLE_PREFIX."games_rating`,
`".TABLE_PREFIX."games_scores`,
`".TABLE_PREFIX."games_settings`,
`".TABLE_PREFIX."games_templates`,
`".TABLE_PREFIX."games_themes`;");
$db->query("ALTER TABLE `".TABLE_PREFIX."adminoptions` DROP `canmanagegames`");
$db->query("ALTER TABLE `".TABLE_PREFIX."usergroups` DROP `canviewgames`,
DROP `canplaygames`;");
$db->query("ALTER TABLE `".TABLE_PREFIX."users` DROP `maxgames`,
DROP `maxscores`,
DROP `sortat`,
DROP `sorting`,
DROP `games_theme`;");
require_once MYBB_ROOT.'inc/adminfunctions_templates.php';
find_replace_templatesets('header', '#'.preg_quote('{$lang->toplinks_help}</a></li>
<li><a href="{$mybb->settings[\'bburl\']}/games.php">{$lang->gamesection}</a></li>').'#', '{$lang->toplinks_help}</a></li>');
find_replace_templatesets('usercp_nav', '#'.preg_quote('{$usercpmenu}
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->gamesection}</strong></span></td></tr>
<tr>
<td class="trow1">
<ul class="usercpnav">
<li><a href="games.php?settings">{$lang->yoursettings}</a></li>
</ul>
</td>
</tr>').'#', '{$usercpmenu}');
}