Example #1
0
 /**
  * Register the plugin with the dispatcher
  *
  * @param Kokx_Event_Dispatcher $dispatcher
  *
  * @return Kokx_Irc_Bot_Plugin_PluginInterface
  */
 public function register(Kokx_Event_Dispatcher $dispatcher)
 {
     $dispatcher->subscribe('privmsg', array($this, 'privmsg'));
     $dispatcher->subscribe('notice', array($this, 'notice'));
     $dispatcher->subscribe('part', array($this, 'part'));
     $dispatcher->subscribe('quit', array($this, 'part'));
     $dispatcher->subscribe('join', array($this, 'join'));
     // this event gives the names of the people currently in this channel
     $dispatcher->subscribe('353', array($this, 'names'));
 }
Example #2
0
 /**
  * Register the plugin with the dispatcher
  *
  * @param Kokx_Event_Dispatcher $dispatcher
  *
  * @return Kokx_Irc_Bot_Plugin_PluginInterface
  */
 public function register(Kokx_Event_Dispatcher $dispatcher)
 {
     $dispatcher->subscribe('timer', array($this, 'timer'));
 }
Example #3
0
 /**
  * Register the plugin with the dispatcher
  *
  * @param Kokx_Event_Dispatcher $dispatcher
  *
  * @return Kokx_Irc_Bot_Plugin_PluginInterface
  */
 public function register(Kokx_Event_Dispatcher $dispatcher)
 {
     $dispatcher->subscribe('376', array($this, 'motd'));
 }