Ejemplo n.º 1
0
 /**
  * Displays stuff to the broswer and sends data to the server.
  * @param string $cmd The command to execute.
  *
  * @author Daniel Siepmann <*****@*****.**>
  */
 public function sendDataToServer($cmd)
 {
     if (mb_substr($cmd, 0, 4) != 'PASS') {
         $this->log($cmd, 'COMMAND');
     } else {
         $this->log('PASS *****', 'COMMAND');
     }
     $this->connection->sendData($cmd);
 }
Ejemplo n.º 2
0
 /**
  * Sends PRIVMSG to source with $msg
  *
  * @param string $msg
  */
 protected function say($msg, $source)
 {
     $this->connection->sendData('PRIVMSG ' . $source . ' :' . $msg);
 }
Ejemplo n.º 3
0
 /**
  * Sends PRIVMSG to source with $msg
  *
  * @param string $msg
  */
 protected function say($msg, $source)
 {
     $message = 'PRIVMSG ' . $source . ' :' . $msg;
     $this->connection->sendData($message);
     $this->bot->log($message, 'COMMAND');
 }
Ejemplo n.º 4
0
 protected function notice($msg)
 {
     $ircUser = ltrim(current(explode('!', $this->data)), ':');
     $toNick = $this->source == $this->bot->getNick() ? $ircUser : $this->source;
     $this->connection->sendData('NOTICE ' . $toNick . ' :' . $msg);
 }
Ejemplo n.º 5
0
 /**
  * Displays stuff to the broswer and sends data to the server.
  * @param string $cmd The command to execute.
  *
  * @author Daniel Siepmann <*****@*****.**>
  */
 public function sendDataToServer($cmd)
 {
     $this->log($cmd, 'COMMAND');
     $this->connection->sendData($cmd);
 }