Go to the source code of this file.
Data Structures | |
| struct | CmdHash |
| struct | HelpEntry |
Defines | |
| #define | CMD_ERR_OK 0 |
| #define | CMD_ERR_INV 1 |
| #define | CMD_ERR_ACC 2 |
| #define | CMD_ERR_PARAMS 3 |
| #define | CMD_ERR_INDEX 4 |
| #define | CMD_ERR_HASH 5 |
Functions | |
| int | HELP_FOREACH (User *, User *) |
| int | do_cmd (char *cmd, User *us, User *u, int ac, char *av) |
| void | ACCESS_DENIED (User *, User *) |
| CmdHash * | CmdHashCreate (User *u) |
| int | AddCmd (User *, char *, char *, void(*fnct)(User *, char **)) |
| void | DelCmd (User *, char *, void(*fnct)(User *, char **)) |
| int | AddHelpExt (int index, User *u, void(*helpcmd)(User *)) |
| int | AddHelp (User *u, void(*helpcmd)(User *)) |
| int | DelHelp (User *u, void(*helpcmd)(User *)) |
| char * | CmdErr (int) |
| static void | ClientCmdNull (User *u, char *av) |
| void ACCESS_DENIED | ( | User * | , | |
| User * | ||||
| ) |
| int AddCmd | ( | User * | u, | |
| char * | name, | |||
| char * | access, | |||
| void(*)(User *, char **) | fnct | |||
| ) |
Add a command to our clients command hash.
| u | Pointer to our clients structure | |
| name | The name of the command we are using, this is imporntant becuase the command will be issued and looked up via its name. | |
| access | Access level required to issue the command. | |
| fnct | A pointer to the command's function. |
Definition at line 67 of file cmds.c.
References alog(), DEBUG3, dlink_add_tail(), dlink_create(), HASH, and strlcpy().
Referenced by Module_Init().
| int AddHelp | ( | User * | u, | |
| void(*)(User *) | helpcmd | |||
| ) |
Definition at line 96 of file cmds.c.
References alog(), DEBUG3, dlink_add_tail(), dlink_create(), and HelpEntry::routine.
Referenced by Module_Init().
| int AddHelpExt | ( | int | index, | |
| User * | u, | |||
| void(*)(User *) | helpcmd | |||
| ) |
Definition at line 121 of file cmds.c.
References alog(), DEBUG3, dlink_add_tail(), dlink_create(), and HelpEntry::routine.
Referenced by Module_Init().
| static void ClientCmdNull | ( | User * | u, | |
| char * | av | |||
| ) | [static] |
| char* CmdErr | ( | int | ) |
Definition at line 319 of file cmds.c.
Referenced by HandleClientCmds().
| CmdHash* CmdHashCreate | ( | User * | u | ) |
| void DelCmd | ( | User * | , | |
| char * | , | |||
| void(*)(User *, char **) | fnct | |||
| ) |
Definition at line 171 of file cmds.c.
References dlink_find_delete(), DLINK_FOREACH_SAFE, dlink_free(), HASH, and MyFree.
| int DelHelp | ( | User * | u, | |
| void(*)(User *) | helpcmd | |||
| ) |
Definition at line 144 of file cmds.c.
References dlink_find_delete(), DLINK_FOREACH, dlink_free(), and HelpEntry::routine.
Referenced by Module_Close().
| int do_cmd | ( | char * | cmd, | |
| User * | us, | |||
| User * | u, | |||
| int | ac, | |||
| char * | av | |||
| ) |
int do_cmd() - Handles a command to a client - do all the santatity checks here.
| cmd | = The command we are actioning on. | |
| us | = A pointer to OUR client struct | |
| u | = A pointer to the SRC of the command | |
| ac | = The argument count being passed into the command handler - used to see if av is null :) | |
| av | = The PARAMATERS to the command - the original command. |
Definition at line 224 of file cmds.c.
References CfgSettings, check_access(), DLINK_FOREACH, generictoken(), HASH, HELP_FOREACH(), Conf::operonly, HelpEntry::routine, and sendto_one().
Referenced by HandleClientCmds().
| int HELP_FOREACH | ( | User * | , | |
| User * | ||||
| ) |
Definition at line 302 of file cmds.c.
References DLINK_FOREACH, and HelpEntry::routine.
Referenced by do_cmd().
1.6.3