Changeset 152
- Timestamp:
- 03/09/08 19:01:31 (9 months ago)
- Files:
-
- trunk/Phergie/Plugin/ChuckNorris.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/ChuckNorris.php
r144 r152 241 241 // Check to see if the message includes the word Chuck Norris. If so, check to see if 242 242 // it was a bot request by checking for Fact: at the begiining and also do a floodpro check 243 if (preg_match('{(chuck\s*norris)}i', $message, $m) && 243 if (!preg_match('{^(?:' . $this->getIni('nick') . '\s*:?\s+)}i', $message, $m) && 244 preg_match('{(chuck\s*norris)}i', $message, $m) && 244 245 strtolower(substr($message, 0, 5)) != 'fact:' && 245 246 ($this->floodCheck <= 0 || ($this->floodCache[$source] < (time() - $this->floodCheck)))) { … … 250 251 $this->doPrivmsg($source, 'Fact: '.$fact); 251 252 $this->floodCache[$source] = time(); 252 unset($ fact);253 unset($m, $fact); 253 254 } 254 255 }