public function receiveMessage(PhabricatorIRCMessage $message) { switch ($message->getCommand()) { case '422': // Error - no MOTD // Error - no MOTD case '376': // End of MOTD $nickpass = $this->getConfig('nickpass'); if ($nickpass) { $this->write('PRIVMSG', "nickserv :IDENTIFY {$nickpass}"); } $join = $this->getConfig('join'); if (!$join) { throw new Exception("Not configured to join any channels!"); } foreach ($join as $channel) { $this->write('JOIN', $channel); } break; case 'PING': $this->write('PONG', $message->getRawData()); break; } }
public function receiveMessage(PhabricatorIRCMessage $message) { switch ($message->getCommand()) { case 'PING': $this->write('PONG', $message->getRawData()); break; } }
public function receiveMessage(PhabricatorIRCMessage $message) { switch ($message->getCommand()) { case '376': // End of MOTD $join = $this->getConfig('join'); if (!$join) { throw new Exception("Not configured to join any channels!"); } foreach ($join as $channel) { $this->write('JOIN', $channel); } break; case 'PING': $this->write('PONG', $message->getRawData()); break; } }