Skip to content
Marlin Cremers edited this page Apr 28, 2012 · 10 revisions

The event handler

The framework has a built-in event handler.

Assigning a event to a function

Assigning a event to a function is pretty easy. It is done this way:

addEventCallback(string $eventName, callback $function);

A list events

The join event

  • Name: onJoin
  • Data: IRCBot_Commands_Join instance

The part event

  • Name: onPart
  • Data: IRCBot_Commands_Part instance

The topic event

  • Name: onTopic
  • Data: IRCBot_Commands_Topic instance or IRCBot_Types_Numeric instance

The error command event

  • Name: onError
  • Data: IRCBot_Commands_Error instance

The event that belongs to numeric 353 with parsed data

  • Name: onNameReply
  • Date: IRCBot_Types_NameReply instance