mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-10-19 00:23:54 -05:00
Auth checking was done relatively sporadically in the past, but this change adds $users->isSysop/isAdmin/isLeader for more centralized auth checking.
18 lines
569 B
PHP
18 lines
569 B
PHP
<?php
|
|
|
|
include_once __DIR__ . '/../../config/servers.inc.php';
|
|
include_once '../../lib/ntbb-session.lib.php';
|
|
|
|
function saveservers() {
|
|
file_put_contents(__DIR__ . '/../../config/servers.inc.php', '<?php
|
|
|
|
/* if ((substr($_SERVER[\'REMOTE_ADDR\'],0,11) === \'69.164.163.\') ||
|
|
(@substr($_SERVER[\'HTTP_X_FORWARDED_FOR\'],0,11) === \'69.164.163.\')) {
|
|
file_put_contents(dirname(__FILE__).\'/log\', "blocked: ".var_export($_SERVER, TRUE)."\n\n", FILE_APPEND);
|
|
die(\'website disabled\');
|
|
} */
|
|
|
|
$PokemonServers = '.var_export($GLOBALS['PokemonServers'], true).';
|
|
');
|
|
}
|