Boucherot::Plugin - A Mother class for Boucherot plugins
This is class is the parent for all the plugins that the boucherot bot can use.
A plugin is a perl module (.pm) that can be loaded at run time, or unloaded at run time.
It's also a Module for Boucherot, that mean it can be manipulated by the ``ModuleManager''.
So the Plugin class implement the ``mid'' attribut and interface.
class Boucherot::Plugin
Attributs:
- context : SCALAR
Methods:
+$ new ( args : HASH ) : Boucherot::Plugin
+$ init () +$ end ()
+$ on_load () +$ on_unload ()
+ add_message_handler (
event : SCALAR,
methodName : SCALAR,
other_args : HASH
)
+ add_timeout_handler ( interval : SCALAR, methodName : SCALAR, ... ) :
+ add_timer_handler ( interval : SCALAR, methodName : SCALAR, ... ) :
+ add_at_handler ( at : SCALAR, methodName : SCALAR, ... ) :
+ log ( message : SCALAR )
+ command ( command : SCALAR )
# DESTROY () :
+$ new ( args : HASH ) : Boucherot::Plugin
Create a new instance of Boucherot::Plugin.
+$ init () +$ end ()
+$ on_load () +$ on_unload ()
+ add_message_handler (
event : SCALAR,
methodName : SCALAR,
other_args : HASH
)
Add a new ``message handler''. A message handler is executed each time a message of the type event is received from server or DCC.
+ add_timeout_handler ( interval : SCALAR, methodName : SCALAR, ... )
Add a new ``timeout handler''. A timeout handler is executed once, at time+interval/1000 (interval is in ms).
+ add_timer_handler ( interval : SCALAR, methodName : SCALAR, ... )
Add a new ``timer handler''. A timer handler is executed several time, each interval (interval is in ms).
+ add_at_handler ( at : SCALAR, methodName : SCALAR, ... )
Add a new ``at handler''. A timeout handler is executed once, at at (at is a time, like the time function can return).
???
+ log ( message : SCALAR )
Add a log line into the ``plugin'' log.
+ command ( command : SCALAR )
Execute a command (a / command, like ``/msg __wheel__ hey, you're a mushroom'' )
# handlers ( ) : ARRAY # handlers ( context1 : SCALAR, context2 : SCALAR, ... ) : ARRAY
Return the list of all the handlers linked with the Plugin or corresponding to the given arguments
# DESTROY () :
Destroy an instance.
This class was written by Arthibus Gissehel <gissehel@vachefolle.com> in 2000.
This class is part of the Boucherot project.