示例#1
0
文件: Block1.php 项目: sinfocol/gwf3
 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;
 }
示例#2
0
 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);
 }