diff --git a/classes/irc.class.php b/classes/irc.class.php index 7ee9cd91..737ac28c 100644 --- a/classes/irc.class.php +++ b/classes/irc.class.php @@ -185,24 +185,20 @@ protected function listen() { unset($this->Identified[$Nick[1]]); } if (isset($this->DisabledUsers[$Nick[1]])) { - if ($this->DisabledUsers[$Nick[1]]['ID'] != 0) { - G::$DB->query(" - DELETE FROM disable_list - WHERE Nick = '$Nick[1]'"); - G::$Cache->decrement_value('num_disablees'); - } + G::$DB->query(" + DELETE FROM disable_list + WHERE Nick = '$Nick[1]'"); + G::$Cache->increment_value('num_disablees', -1); unset($this->DisabledUsers[$Nick[1]]); } } if (preg_match("/:([^!]+)![^\s]* PART ".BOT_DISABLED_CHAN.'/', $this->Data, $Nick)) { if (isset($this->DisabledUsers[$Nick[1]])) { - if ($this->DisabledUsers[$Nick[1]]['ID'] != 0) { - G::$DB->query(" - DELETE FROM disable_list - WHERE Nick = '$Nick[1]'"); - G::$Cache->decrement_value('num_disablees'); - } + G::$DB->query(" + DELETE FROM disable_list + WHERE Nick = '$Nick[1]'"); + G::$Cache->increment_value('num_disablees', -1); unset($this->DisabledUsers[$Nick[1]]); } } @@ -210,12 +206,10 @@ protected function listen() { if (preg_match("/:([^!]+)![^\s]* KICK ".BOT_DISABLED_CHAN.'.* /', $this->Data, $Nick)) { $Nick = explode(' ', $Nick[0]); if (isset($this->DisabledUsers[$Nick[3]])) { - if ($this->DisabledUsers[$Nick[3]]['ID'] != 0) { - G::$DB->query(" - DELETE FROM disable_list - WHERE Nick = '$Nick[3]'"); - G::$Cache->decrement_value('num_disablees'); - } + G::$DB->query(" + DELETE FROM disable_list + WHERE Nick = '$Nick[3]'"); + G::$Cache->increment_value('num_disablees', -1); unset($this->DisabledUsers[$Nick[3]]); } }