Changeset 236
- Timestamp:
- 04/14/08 08:19:40 (7 months ago)
- Files:
-
- trunk/Phergie/Driver/Streams.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Driver/Streams.php
r232 r236 156 156 } 157 157 158 $ignore = $this->hostmasksToRegex($this->getIni('ignore'));159 160 158 // Run the onConnect handler since we successfully connected to the server 161 159 foreach($this->plugins as $plugin) { … … 313 311 } 314 312 313 $ignore = $this->hostmasksToRegex($this->getIni('ignore')); 314 $method = 'on' . ucfirst($cmd); 315 315 foreach($this->plugins as $plugin) { 316 316 // Skip disabled plugins … … 324 324 if ($event instanceof Phergie_Event_Response) { 325 325 $plugin->onResponse(); 326 // Skip events from ignored users 327 } elseif (!preg_match($ignore, $event->getHostmask()) && !empty($cmd)) { 328 call_user_func(array($plugin, 'on' . ucfirst($cmd))); 329 } 330 } 326 // Skip events from ignored users and malformed packets 327 } elseif (!empty($cmd) && method_exists($plugin, $method) && 328 !preg_match($ignore, $event->getHostmask())) { 329 call_user_func(array($plugin, $method)); 330 } 331 } 332 331 333 $this->queueing = false; 332 334 foreach($this->priority as $command) {