示例#1
0
 private static function sendNick(Dog_IRC $conn, Dog_Server $server, Dog_Nick $nick)
 {
     if (!$conn->send("NICK {$nick->getName()}")) {
         return false;
     }
     if (NULL !== ($pass = $nick->getPass())) {
         if ($server->isBNC()) {
             return $conn->send('PASS ' . $pass);
         } else {
             return $server->sendPRIVMSG('NickServ', 'IDENTIFY ' . $pass);
         }
     }
     return true;
 }