From dc75e79cb532eb0d1ae786bc1f450e49034192d4 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Wed, 11 Jul 2012 16:27:41 -0700 Subject: [PATCH] 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 --- .../daemon/irc/handler/PhabricatorIRCProtocolHandler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/infrastructure/daemon/irc/handler/PhabricatorIRCProtocolHandler.php b/src/infrastructure/daemon/irc/handler/PhabricatorIRCProtocolHandler.php index daf2958a68..383bccab0f 100644 --- a/src/infrastructure/daemon/irc/handler/PhabricatorIRCProtocolHandler.php +++ b/src/infrastructure/daemon/irc/handler/PhabricatorIRCProtocolHandler.php @@ -25,6 +25,7 @@ final class PhabricatorIRCProtocolHandler extends PhabricatorIRCHandler { public function receiveMessage(PhabricatorIRCMessage $message) { switch ($message->getCommand()) { + case '422': // Error - no MOTD case '376': // End of MOTD $join = $this->getConfig('join'); if (!$join) {