Example #1
0
 public function claimServer(Dog_Server $server)
 {
     if ($server->getNick()->isTemp()) {
         if (false !== ($nick = Dog_Nick::getNickFor($server))) {
             $server->sendRAW("NICK {$nick->getName()}");
         }
     }
 }
Example #2
0
 private static function getNickData(Dog_Server $server)
 {
     if (false === ($nick = Dog_Nick::getNickFor($server, $server->getIncreaseNicknum()))) {
         return false;
         // TODO: Random nick
     }
     $server->setNick($nick);
     return $nick;
 }
Example #3
0
 public static function validate()
 {
     $servers = Dog::getServers();
     if (count($servers) === 0) {
         return Dog_Log::error('No server available!');
     }
     foreach ($servers as $server) {
         $server instanceof Dog_Server;
         if ($server->isWebsocket()) {
         } elseif (false === Dog_Nick::getNickFor($server)) {
             return Dog_Log::error(sprintf('Server %s has no nickname setup!', $server->displayName()));
         }
     }
     return true;
 }
Example #4
0
 public function nextNick()
 {
     return Dog_Nick::getNickFor($this, $this->getIncreaseNicknum());
 }