Exemplo n.º 1
0
 /**
  * Sends PRIVMSG to source with $msg
  *
  * @param string $msg
  */
 protected function say($msg, $source)
 {
     $this->connection->sendData('PRIVMSG ' . $source . ' :' . $msg);
 }
Exemplo n.º 2
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');
 }
Exemplo n.º 3
0
 /**
  * Sets the port.
  * E.g. 6667
  * @param integer $port The port to set.
  */
 public function setPort($port)
 {
     $this->connection->setPort($port);
 }
Exemplo 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);
 }
Exemplo n.º 5
0
 /**
  * Sets the nick of the bot.
  * "Yes give me a nick too. I love nicks."
  *
  * @param string $nick The nick of the bot.
  */
 public function setNick($nick)
 {
     $this->nickToUse = $this->nick = (string) $nick;
     $this->connection->setNick($this->nickToUse);
 }