Ejemplo n.º 1
0
 /**
  *	Checks that the bot is connected to the IRC network.
  */
 public function pingServer()
 {
     if ($this->iPingMiss === true) {
         $this->destroyConnection();
         CoreTimer::Add(array($this, "createConnection"), 3);
         return;
     }
     $this->iPingTime = time();
     $this->iPingMiss = true;
     $this->Output("PING {$this->iPingTime}");
 }
Ejemplo n.º 2
0
 /**
  *	Called when there's an error - when someone decides to disconnect the bot.
  */
 public static function onServerError(CoreMaster $pInstance, MessageObject $pMessage)
 {
     $pSocket = $pInstance->pSocket;
     $pSocket->destroyConnection();
     $pInstance->triggerEvent("onServerError", $pMessage->Payload);
     CoreTimer::Add(array($pSocket, "createConnection"), 3);
 }