mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
IRC: Don't set nick on each tick (#12139)
* Trying harder to regain nick * Code cleanup * remove extra nickchange
This commit is contained in:
@@ -153,6 +153,7 @@ class IRCBot
|
||||
}
|
||||
|
||||
$this->doAuth();
|
||||
$this->nickwait = 0;
|
||||
while (true) {
|
||||
foreach ($this->socket as $n => $socket) {
|
||||
if (! is_resource($socket) || feof($socket)) {
|
||||
@@ -162,7 +163,11 @@ class IRCBot
|
||||
}
|
||||
|
||||
if (isset($this->tempnick)) {
|
||||
$this->ircRaw('NICK ' . $this->nick);
|
||||
if ($this->nickwait > 100) {
|
||||
$this->ircRaw('NICK ' . $this->nick);
|
||||
$this->nickwait = 0;
|
||||
}
|
||||
$this->nickwait += 1;
|
||||
}
|
||||
|
||||
$this->getData();
|
||||
|
Reference in New Issue
Block a user