/** * Sends PRIVMSG to source with $msg * * @param string $msg */ protected function say($msg, $source) { $this->connection->sendData('PRIVMSG ' . $source . ' :' . $msg); }
/** * 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'); }
/** * Sets the port. * E.g. 6667 * @param integer $port The port to set. */ public function setPort($port) { $this->connection->setPort($port); }
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); }
/** * 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); }