Dev:Command API

CommandAdd
Command *CommandAdd(Module *module, char *cmd, int (*func), unsigned char params, int flags)


 * module - The module this command is associated with
 * cmd - The text of the command
 * func - A function pointer to be called when this function is executed
 * params - The number of parameters this command accepts
 * flags - The flags for this new command

Adds a new command with given options - when invoked, will be sent parameters: aClient *cptr, aClient *sptr, int parc, char *parv[]

CommandDel
void CommandDel(Command *command)


 * command - Command to be removed

Deletes a command previously created as a result from CommandAdd function call.

CommandExists
int CommandExists(char *name)


 * name - Name of command to check existence of

Determines if a given command has already been added.

CmdoverrideAdd
Cmdoverride *CmdoverrideAdd(Module *module, char *cmd, iFP function)


 * module - The module this override is within
 * cmd - The command you are overriding, without the initial /
 * iFP - Function pointer of form int (*iFP) to be called when command executed - parameters will be defined based on actual command being called

Used to register a command override to be called when a command is executed.

CmdoverrideDel
void CmdoverrideDel(Cmdoverride *ovr)


 * ovr - The CmdOverride previously returned from a CmdoverrideAdd call.

Removes a given override, returning command control flow to how it was prior to CmdoverrideAdd.