public function claimServer(Dog_Server $server) { if ($server->getNick()->isTemp()) { if (false !== ($nick = Dog_Nick::getNickFor($server))) { $server->sendRAW("NICK {$nick->getName()}"); } } }
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; }
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; }
public function nextNick() { return Dog_Nick::getNickFor($this, $this->getIncreaseNicknum()); }