#include "stdinc.h"#include "server.h"Go to the source code of this file.
Functions | |
| static void | SockEventNull (Socket *, int) |
| SockEvent * | FindSockEvent (char *, void(*)()) |
| void | destroy_event_list () |
| int | AddEventEx (char *event, int every, int howmany, void *fnct) |
| void | DelEvent (char *event, void *fnct) |
| void | AddTimedEvent (char *event, void *fnct, int interval) |
| void | RunTimedEvents () |
| void | DelTimedEvent (char *event) |
| void | Event (char *event, int argc, void *argv) |
| void | AddServCmd (char *cmd, void(*fnct)(Link *, int, char **)) |
| int | HandleServCmd (char *command, Link *li, int arc, char **arv) |
| void | DelServCmd (char *cmd, void(*fnct)(Link *, int, char **)) |
| void | AddUserCmd (char *cmd, void(*fnct)(User *, int, char **)) |
| void | DelUserCmd (char *cmd, void(*fnct)(User *, int, char **)) |
| int | HandleUserCmd (char *command, User *u, int arc, char **arv) |
| void | ev_housekeeping (int argc, char **argv) |
| void | ev_connectuplink (int argc, char **argv) |
| void | ev_ping (int argc, char **argv) |
Variables | |
| Events * | event_list |
| Module * | currentModule |
| dlink_list | servcmds |
| dlink_list | usercmds |
| int AddEventEx | ( | char * | event, | |
| int | every, | |||
| int | howmany, | |||
| void * | fnct | |||
| ) |
Definition at line 65 of file eventhandler.c.
References Events::age, alog(), dlink_add_tail(), dlink_create(), events, Events::handler, Events::interval, Events::name, Events::recall, strlcpy(), and Events::when.
| void AddServCmd | ( | char * | cmd, | |
| void(*)(Link *, int, char **) | fnct | |||
| ) |
Definition at line 258 of file eventhandler.c.
References dlink_add_tail(), dlink_create(), ServCmds::fnct, HASH, ServCmds::name, and ServCmdTable.
| void AddTimedEvent | ( | char * | event, | |
| void * | fnct, | |||
| int | interval | |||
| ) |
Definition at line 126 of file eventhandler.c.
References Events::age, alog(), dlink_add_tail(), dlink_create(), events, Events::handler, Events::interval, LOG_ERROR, Events::name, Events::recall, strlcpy(), and Events::when.
Referenced by send_line(), and sock_getbyte().
| void AddUserCmd | ( | char * | cmd, | |
| void(*)(User *, int, char **) | fnct | |||
| ) |
Okay instead of using a fat dlinked list index the commands by name into a hash then retrieve assocated lists this will save time in the future.
Definition at line 345 of file eventhandler.c.
References UserCmds::active, dlink_add_tail(), dlink_create(), HASH, UserCmds::routine, and UserCmdTable.
Referenced by psr_init().
| void DelEvent | ( | char * | event, | |
| void * | fnct | |||
| ) |
Definition at line 102 of file eventhandler.c.
References dlink_delete(), DLINK_FOREACH, dlink_free(), events, and Events::handler.
| void DelServCmd | ( | char * | cmd, | |
| void(*)(Link *, int, char **) | fnct | |||
| ) |
Definition at line 305 of file eventhandler.c.
References dlink_find_delete(), DLINK_FOREACH, dlink_free(), ServCmds::fnct, HASH, ServCmdTable, and UserCmdTable.
| void DelTimedEvent | ( | char * | event | ) |
Definition at line 194 of file eventhandler.c.
References dlink_delete(), DLINK_FOREACH, dlink_free(), events, and Events::name.
Referenced by ev_connectuplink().
| void DelUserCmd | ( | char * | cmd, | |
| void(*)(User *, int, char **) | fnct | |||
| ) |
Definition at line 367 of file eventhandler.c.
References UserCmds::active, dlink_find_delete(), DLINK_FOREACH, dlink_free(), HASH, UserCmds::routine, and UserCmdTable.
| void destroy_event_list | ( | ) |
Definition at line 40 of file eventhandler.c.
References alog(), dlink_delete(), DLINK_FOREACH_SAFE, dlink_free(), events, and LOG_EVENT.
Referenced by AtExit().
| void ev_connectuplink | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 442 of file eventhandler.c.
References alog(), CfgSettings, Connect(), DelTimedEvent(), ircd_connect(), LOG_ERROR, Conf::port, Socket::sd, servsock, Conf::uplink, and Conf::vhost.
Referenced by ev_ping(), Run(), send_line(), and sock_getbyte().
| void ev_housekeeping | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 436 of file eventhandler.c.
Referenced by Run().
| void ev_ping | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 468 of file eventhandler.c.
References AddEventEx(), ev_connectuplink(), IRCd, ircd_ping(), Link::lastpong, Link::name, Socket::sd, servsock, Link::sid, IRCDProto::ts6, Uplink, and uplink_cleanup().
Referenced by Run().
| void Event | ( | char * | event, | |
| int | argc, | |||
| void * | argv | |||
| ) |
Definition at line 222 of file eventhandler.c.
References alog(), debug, DEBUG3, dlink_delete(), DLINK_FOREACH_SAFE, dlink_free(), events, Events::handler, Events::name, and Events::recall.
Referenced by AddToChannel(), AddToChannelU(), AddUser(), AtExit(), DelFromChannel(), do_restart(), exit_one_user(), exit_serv(), KickFromChannel(), new_serv(), and Rehash().
| SockEvent* FindSockEvent | ( | char * | , | |
| void(*)() | ||||
| ) |
| int HandleServCmd | ( | char * | command, | |
| Link * | li, | |||
| int | arc, | |||
| char ** | arv | |||
| ) |
Definition at line 274 of file eventhandler.c.
References alog(), DEBUG3, DLINK_FOREACH, ServCmds::fnct, HASH, ServCmds::name, and ServCmdTable.
Referenced by parse().
| int HandleUserCmd | ( | char * | command, | |
| User * | u, | |||
| int | arc, | |||
| char ** | arv | |||
| ) |
Definition at line 403 of file eventhandler.c.
References DLINK_FOREACH, HASH, UserCmds::routine, and UserCmdTable.
Referenced by parse().
| void RunTimedEvents | ( | ) |
Definition at line 157 of file eventhandler.c.
References dlink_delete(), DLINK_FOREACH_SAFE, dlink_free(), events, Events::handler, Events::interval, Events::last, Events::recall, ServerTime, and Events::when.
Referenced by OneTimeAround().
| static void SockEventNull | ( | Socket * | s, | |
| int | et | |||
| ) | [static] |
Definition at line 490 of file eventhandler.c.
| dlink_list servcmds |
Definition at line 32 of file eventhandler.c.
| dlink_list usercmds |
Definition at line 33 of file eventhandler.c.
1.6.3