public function isExitAllowed(SR_Player $player) { # Eek? if (false === ($user = $player->getUser())) { return false; } # Check idle time. $last = $user->getVar('lusr_timestamp'); if ($last + self::BAN_TIME > time()) { return false; } return true; }
public static function isGM(SR_Player $player) { if (NULL === self::$GMS) { /** * @Example GameMasters.php in this directory: * * <? return array('gizmore{14}'); ?> */ if (false === (self::$GMS = @(include_once 'GameMasters.php'))) { self::$GMS = array('gizmore{1}'); } } if (false === ($user = $player->getUser())) { return false; } if (!$user->isLoggedIn()) { return false; } return in_array($player->getName(), self::$GMS, true); }