Exemple #1
0
 public function onJoinTell(Dog_Server $server, Dog_User $user)
 {
     if ($user->isRegistered() && !$user->isLoggedIn()) {
         return;
     }
     $userid = $user->getID();
     if (0 == ($count = Dog_Note::countUnread($userid))) {
         return;
     }
     $username = $user->getName();
     if ($count == 1) {
         $user->sendPRIVMSG($this->lang('note1'));
     } else {
         $user->sendPRIVMSG($this->lang('note2'));
     }
     for ($i = 0; $i < $count; $i++) {
         $user->sendPRIVMSG($this->readNext($server, $user));
     }
 }