Empty commit

This commit is contained in:
Git 2014-06-05 08:00:27 +00:00
parent 2651bd88cc
commit 14faba1050
2 changed files with 27 additions and 12 deletions

View File

@ -182,6 +182,15 @@ public function increment_value($Key, $Value = 1) {
$this->Time += (microtime(true) - $StartTime) * 1000;
}
public function decrement_value($Key, $Value = 1) {
$StartTime = microtime(true);
$NewVal = $this->decrement($Key, $Value);
if (isset($this->CacheHits[$Key])) {
$this->CacheHits[$Key] = $NewVal;
}
$this->Time += (microtime(true) - $StartTime) * 1000;
}
//---------- memcachedb functions ----------//
public function begin_transaction($Key) {

View File

@ -185,20 +185,24 @@ protected function listen() {
unset($this->Identified[$Nick[1]]);
}
if (isset($this->DisabledUsers[$Nick[1]])) {
G::$DB->query("
DELETE FROM disable_list
WHERE Nick = '$Nick[1]'");
G::$Cache->increment_value('num_disablees', -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');
}
unset($this->DisabledUsers[$Nick[1]]);
}
}
if (preg_match("/:([^!]+)![^\s]* PART ".BOT_DISABLED_CHAN.'/', $this->Data, $Nick)) {
if (isset($this->DisabledUsers[$Nick[1]])) {
G::$DB->query("
DELETE FROM disable_list
WHERE Nick = '$Nick[1]'");
G::$Cache->increment_value('num_disablees', -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');
}
unset($this->DisabledUsers[$Nick[1]]);
}
}
@ -206,10 +210,12 @@ protected function listen() {
if (preg_match("/:([^!]+)![^\s]* KICK ".BOT_DISABLED_CHAN.'.* /', $this->Data, $Nick)) {
$Nick = explode(' ', $Nick[0]);
if (isset($this->DisabledUsers[$Nick[3]])) {
G::$DB->query("
DELETE FROM disable_list
WHERE Nick = '$Nick[3]'");
G::$Cache->increment_value('num_disablees', -1);
if ($this->DisabledUsers[$Nick[3]]['ID'] != 0) {
G::$DB->query("
DELETE FROM disable_list
WHERE Nick = '$Nick[3]'");
G::$Cache->decrement_value('num_disablees');
}
unset($this->DisabledUsers[$Nick[3]]);
}
}