mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-26 01:57:21 -05:00
Support server-side autolock IPs
This commit is contained in:
parent
a612743d74
commit
fdad94ba7f
|
|
@ -126,12 +126,13 @@ class NTBBSession {
|
|||
$username = 'Guest';
|
||||
$userid = 'guest';
|
||||
}
|
||||
return array(
|
||||
return [
|
||||
'username' => $username,
|
||||
'userid' => $userid,
|
||||
'group' => 0,
|
||||
'loggedin' => false
|
||||
);
|
||||
'loggedin' => false,
|
||||
'ip' => $this->getIp(),
|
||||
];
|
||||
}
|
||||
|
||||
function qsid() { return $this->scookie ? '?sid='.$this->scookie : ''; }
|
||||
|
|
@ -461,6 +462,7 @@ class NTBBSession {
|
|||
}
|
||||
$ip = $this->getIp();
|
||||
$forceUsertype = false;
|
||||
if (in_array($ip, $psconfig['autolock_ip']) || in_array($user['ip'], $psconfig['autolock_ip'])) $forceUsertype = '5';
|
||||
|
||||
if (($user['userid'] === $userid) && !empty($user['loggedin'])) {
|
||||
// already logged in
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user