1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Make IRC Bot connect on both successful end of MOTD (376) and non-successful MOTD (422)

Summary: http://www.networksorcery.com/enp/protocol/irc.htm

Test Plan: augment code with an additional debug line (phlog('hi');) so I can see my case was trigged and it will fall through. setup an ill-configured IRC server with ngircd. Configure an ircbot to connect to said ill-configured IRC server. verify ircbot connected to channel. verify in irc bot logs that debug line was invoked.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1452

Differential Revision: https://secure.phabricator.com/D2962
This commit is contained in:
Bob Trahan 2012-07-11 16:27:41 -07:00
parent fcd04708d2
commit dc75e79cb5

View file

@ -25,6 +25,7 @@ final class PhabricatorIRCProtocolHandler extends PhabricatorIRCHandler {
public function receiveMessage(PhabricatorIRCMessage $message) { public function receiveMessage(PhabricatorIRCMessage $message) {
switch ($message->getCommand()) { switch ($message->getCommand()) {
case '422': // Error - no MOTD
case '376': // End of MOTD case '376': // End of MOTD
$join = $this->getConfig('join'); $join = $this->getConfig('join');
if (!$join) { if (!$join) {