mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +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:
parent
bd2b557b42
commit
2d677d3992
1 changed files with 6 additions and 0 deletions
|
@ -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}");
|
||||
|
|
Loading…
Reference in a new issue