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:
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');
|
$pass = idx($config, 'pass');
|
||||||
$nick = idx($config, 'nick', 'phabot');
|
$nick = idx($config, 'nick', 'phabot');
|
||||||
$user = idx($config, 'user', $nick);
|
$user = idx($config, 'user', $nick);
|
||||||
|
$ssl = idx($config, 'ssl', false);
|
||||||
|
$nickpass = idx($config, 'nickpass');
|
||||||
|
|
||||||
if (!preg_match('/^[A-Za-z0-9_`[{}^|\]\\-]+$/', $nick)) {
|
if (!preg_match('/^[A-Za-z0-9_`[{}^|\]\\-]+$/', $nick)) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
@ -107,6 +109,10 @@ 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}");
|
||||||
foreach ($join as $channel) {
|
foreach ($join as $channel) {
|
||||||
$this->writeCommand('JOIN', "{$channel}");
|
$this->writeCommand('JOIN', "{$channel}");
|
||||||
|
|
Loading…
Reference in a new issue