commands.h File Reference

#include "modules.h"

Go to the source code of this file.

Functions

void do_help_cmd (char *service, User *u, Command *c, const char *cmd)
void do_run_cmd (char *service, User *u, Command *c, const char *cmd)
void help_cmd (char *service, User *u, Command *list, char *name)
Commandlookup_cmd (Command *list, char *name)
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)
void run_cmd (char *service, User *u, Command *list, char *name)


Function Documentation

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

Print a help message for the given command.

Parameters:
services Services Client
u User Struct
c Command Struct
cmd Command
Returns:
void

Definition at line 162 of file commands.c.

References Command_::all_help, findModule(), Command_::help_param1, Command_::help_param2, Command_::help_param3, Command_::help_param4, Command_::helpmsg_all, MOD_CONT, mod_current_module, mod_current_module_name, Command_::mod_name, Command_::next, and notice_help().

Referenced by help_cmd(), and mod_help_cmd().

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

Run the given command

Parameters:
services Services Client
u User Struct
c Command Struct
cmd Command
Returns:
void

Definition at line 86 of file commands.c.

References alog(), checkDefCon(), DEFCON_OPER_ONLY, DEFCON_SILENT_OPER_ONLY, 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:
services Services Client
u User Struct
c Command Struct
cmd Command
Returns:
void

Definition at line 248 of file commands.c.

References do_help_cmd(), and lookup_cmd().

Command* lookup_cmd ( Command list,
char *  cmd 
)

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

Parameters:
list Command struct
cmd Command to look up
Returns:
Command Struct for the given cmd

Definition at line 28 of file commands.c.

References 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:
services Services Client
u User Struct
Command Hash Table
cmd Command
Returns:
void

Definition at line 264 of file commands.c.

References 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:
services Services Client
u User Struct
Command Hash Table
cmd Command
Returns:
void

Definition at line 68 of file commands.c.

References 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:
services Services Client
u User Struct
list Command struct
cmd Command
Returns:
void

Definition at line 51 of file commands.c.

References do_run_cmd(), and lookup_cmd().


Generated on Sun Dec 30 09:26:53 2007 for Anope by  doxygen 1.5.1-20070107