* @return void\r
*/\r
public function onNotice() {\r
- $event = $this->getEvent();\r
- if ($event->getNick() == 'NickServ') {\r
- $message = $event->getArgument(1);\r
- if (preg_match($this->unregRegexp, $message, $groups)) {\r
- $screenname = $groups[1];\r
- call_user_func($this->regCallback, array('screenname' => $screenname, 'registered' => false));\r
- } elseif (preg_match($this->regRegexp, $message, $groups)) {\r
- $screenname = $groups[1];\r
- call_user_func($this->regCallback, array('screenname' => $screenname, 'registered' => true));\r
+ if ($this->regCallback !== NULL) {\r
+ $event = $this->getEvent();\r
+ if ($event->getNick() == 'NickServ') {\r
+ $message = $event->getArgument(1);\r
+ if (preg_match($this->unregRegexp, $message, $groups)) {\r
+ $screenname = $groups[1];\r
+ call_user_func($this->regCallback, array('screenname' => $screenname, 'registered' => false));\r
+ } elseif (preg_match($this->regRegexp, $message, $groups)) {\r
+ $screenname = $groups[1];\r
+ call_user_func($this->regCallback, array('screenname' => $screenname, 'registered' => true));\r
+ }\r
}\r
}\r
}\r