/** * 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); }
/** * 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'); }
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); }
/** * 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); }