From fb87d0f4919b2cda05ddec821206387499083c74 Mon Sep 17 00:00:00 2001 From: Roy Sindre Norangshol Date: Tue, 4 Mar 2014 20:06:56 +0100 Subject: [PATCH] (PhabricatorIRCProtocolAdapter.connect) Use recommended connection registration order from RFC{1459,2812} http://tools.ietf.org/html/rfc1459.html#section-4.1 and http://tools.ietf.org/html/rfc2812#section-3.1 mentions that client should send the PASS first, then the latter of NICK/USER. This is tested and confirmed working with ngircd commit 485d0aec813db9966922f17aae044df2d82b0b67 See: Reviewed by: epriestley --- .../daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php b/src/infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php index 2d472e7bc3..ad79748de1 100644 --- a/src/infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php +++ b/src/infrastructure/daemon/bot/adapter/PhabricatorIRCProtocolAdapter.php @@ -49,11 +49,11 @@ final class PhabricatorIRCProtocolAdapter } $this->socket = $socket; - $this->write("USER {$user} 0 * :{$user}"); if ($pass) { $this->write("PASS {$pass}"); } $this->write("NICK {$nick}"); + $this->write("USER {$user} 0 * :{$user}"); } public function getNextMessages($poll_frequency) {