Anope IRC Services  Version 1.8
Functions
commands.h File Reference
#include "modules.h"
Include dependency graph for commands.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

MDE Commandlookup_cmd (Command *list, char *name)
 
void run_cmd (char *service, User *u, Command *list, char *name)
 
void help_cmd (char *service, User *u, Command *list, char *name)
 
void do_run_cmd (char *service, User *u, Command *c, const char *cmd)
 
MDE void do_help_limited (char *service, User *u, Command *c)
 
void do_help_cmd (char *service, User *u, Command *c, const char *cmd)
 
MDE void mod_help_cmd (char *service, User *u, CommandHash *cmdTable[], const char *cmd)
 
MDE void mod_run_cmd (char *service, User *u, CommandHash *cmdTable[], const char *cmd)
 

Function Documentation

void do_help_cmd ( char *  service,
User u,
Command c,
const char *  cmd 
)
MDE void do_help_limited ( char *  service,
User u,
Command c 
)

Output the 'Limited to' line for the given command

Parameters
serviceServices Client
uUser Struct
cCommand Struct
Returns
void

Definition at line 137 of file commands.c.

References Command_::has_priv, is_host_remover(), is_host_setter(), is_oper(), is_services_admin(), is_services_oper(), is_services_root(), and notice_lang().

Referenced by do_help_cmd(), and myHelpResonse().

void do_run_cmd ( char *  service,
User u,
Command c,
const char *  cmd 
)

Run the given command

Parameters
servicesServices Client
uUser Struct
cCommand Struct
cmdCommand
Returns
void

Definition at line 85 of file commands.c.

References alog(), checkDefCon(), current, DEFCON_OPER_ONLY, DEFCON_SILENT_OPER_ONLY, findModule(), Command_::has_priv, is_oper(), MOD_CONT, mod_current_module, mod_current_module_name, Command_::mod_name, Command_::next, user_::nick, notice_lang(), and Command_::routine.

Referenced by mod_run_cmd(), and run_cmd().

void help_cmd ( char *  service,
User u,
Command list,
char *  cmd 
)

Find the Help Command

Parameters
servicesServices Client
uUser Struct
cCommand Struct
cmdCommand
Returns
void

Definition at line 250 of file commands.c.

References c, do_help_cmd(), and lookup_cmd().

MDE Command* lookup_cmd ( Command list,
char *  cmd 
)

Return the Command corresponding to the given name, or NULL if no such command exists.

Parameters
listCommand struct
cmdCommand to look up
Returns
Command Struct for the given cmd

Definition at line 27 of file commands.c.

References c, Command_::name, and stricmp().

Referenced by help_cmd(), and run_cmd().

MDE void mod_help_cmd ( char *  service,
User u,
CommandHash cmdTable[],
const char *  cmd 
)

Find the Help Command

Parameters
servicesServices Client
uUser Struct
CommandHash Table
cmdCommand
Returns
void

Definition at line 266 of file commands.c.

References c, do_help_cmd(), and findCommand().

Referenced by do_help().

MDE void mod_run_cmd ( char *  service,
User u,
CommandHash cmdTable[],
const char *  cmd 
)

Run the routine for the given command, if it exists and the user has privilege to do so; if not, print an appropriate error message.

Parameters
servicesServices Client
uUser Struct
CommandHash Table
cmdCommand
Returns
void

Definition at line 67 of file commands.c.

References c, do_run_cmd(), and findCommand().

Referenced by botserv(), catserv(), chanserv(), helpserv(), hostserv(), memoserv(), nickserv(), and operserv().

void run_cmd ( char *  service,
User u,
Command list,
char *  cmd 
)

Run the routine for the given command, if it exists and the user has privilege to do so; if not, print an appropriate error message.

Parameters
servicesServices Client
uUser Struct
listCommand struct
cmdCommand
Returns
void

Definition at line 50 of file commands.c.

References c, do_run_cmd(), and lookup_cmd().