mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Fix irc server login
Summary: Previously, the identification string was thrown at the server long before you were connected, I've moved this to the end of the motd raw, and now errthangz gud Test Plan: Register an account for your bot to use, give your bot the correct nick and password, then watch Reviewers: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D3410
This commit is contained in:
parent
a64f5b0148
commit
da2fc57d77
2 changed files with 4 additions and 4 deletions
|
@ -117,10 +117,6 @@ final class PhabricatorIRCBot extends PhabricatorDaemon {
|
||||||
$this->writeCommand('PASS', "{$pass}");
|
$this->writeCommand('PASS', "{$pass}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($nickpass) {
|
|
||||||
$this->writeCommand("NickServ IDENTIFY ", "{$nickpass}");
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->writeCommand('NICK', "{$nick}");
|
$this->writeCommand('NICK', "{$nick}");
|
||||||
$this->runSelectLoop();
|
$this->runSelectLoop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,10 @@ final class PhabricatorIRCProtocolHandler extends PhabricatorIRCHandler {
|
||||||
switch ($message->getCommand()) {
|
switch ($message->getCommand()) {
|
||||||
case '422': // Error - no MOTD
|
case '422': // Error - no MOTD
|
||||||
case '376': // End of MOTD
|
case '376': // End of MOTD
|
||||||
|
$nickpass = $this->getConfig('nickpass');
|
||||||
|
if ($nickpass) {
|
||||||
|
$this->write('PRIVMSG', "nickserv :IDENTIFY {$nickpass}");
|
||||||
|
}
|
||||||
$join = $this->getConfig('join');
|
$join = $this->getConfig('join');
|
||||||
if (!$join) {
|
if (!$join) {
|
||||||
throw new Exception("Not configured to join any channels!");
|
throw new Exception("Not configured to join any channels!");
|
||||||
|
|
Loading…
Reference in a new issue