RageIRCd v2.0 (bluemoon): Event Subsystem API
---------------------------------------------

$Id: event-api.txt,v 1.4.2.1 2005/02/21 02:32:45 amcwilliam Exp $
(C) 2000-2005 the RageIRCd Development Team, all rights reserved.

RageIRCd v2.0 incorporates a new events subsystem, allowing functions that 
need to be run to be "scheduled" to run at a point in the future. The 
system is pretty much identical to that from ircd-hybrid-7. If it works, 
why change it? ;)

The events subsystem, as with a lot of things in RageIRCd v2.0, is now 
dynamic. Modules can register Event objects within ircd, for easy 
maintenance. Please read module-objects.txt for more information regarding 
Module Objects.

Event* register_event(Module* owner, char* event_name, void (*event_function)(),
    void* optional_arg, time_t seconds, int loop)

This API function will register a new system event to be called at a frequency
of seconds. If loop is 1, the event will continue until it's removed or the ircd
shuts down.

NB. Please be aware that system events are done on each main loop, but BEFORE
    any network I/O events have been performed.

The function will return a poiunter to the event created on successful object
registration. Otherwise, NULL will be returned.

The function takes a number of parameters. As with other Module_Object API 
calls, the first parameter should be MOD_HEADER. See module-api.txt for 
more information.

As with all module object APIs, you must specify the owner of the object. See
the module-api.txt document for details on using the MOD_HEADER macro.

End of document.
