1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

added the ability for the irc nick to have a identify password. just add "nickpass":"password" to your irc_config.json file and it will identify on connect"

This commit is contained in:
moos3 2011-08-22 17:04:22 -04:00 committed by epriestley
parent bd2b557b42
commit 2d677d3992

View file

@ -56,6 +56,8 @@ final class PhabricatorIRCBot extends PhabricatorDaemon {
$pass = idx($config, 'pass');
$nick = idx($config, 'nick', 'phabot');
$user = idx($config, 'user', $nick);
$ssl = idx($config, 'ssl', false);
$nickpass = idx($config, 'nickpass');
if (!preg_match('/^[A-Za-z0-9_`[{}^|\]\\-]+$/', $nick)) {
throw new Exception(
@ -107,6 +109,10 @@ final class PhabricatorIRCBot extends PhabricatorDaemon {
$this->writeCommand('PASS', "{$pass}");
}
if ($nickpass) {
$this->writeCommand("NickServ IDENTIFY ", "{$nickpass}");
}
$this->writeCommand('NICK', "{$nick}");
foreach ($join as $channel) {
$this->writeCommand('JOIN', "{$channel}");