|
Atrinik Server 2.5
|
#include <global.h>Go to the source code of this file.
Functions | |
| static int | compare_A (const void *a, const void *b) |
| void | init_commands () |
| CommArray_s * | find_command_element (char *cmd, CommArray_s *commarray, int commsize) |
| int | can_do_wiz_command (player *pl, const char *command) |
| int | execute_newserver_command (object *pl, char *command) |
Variables | |
| CommArray_s | Commands [] |
| const int | CommandsSize = sizeof(Commands) / sizeof(CommArray_s) |
| CommArray_s | CommunicationCommands [] |
| const int | CommunicationCommandSize = sizeof(CommunicationCommands)/ sizeof(CommArray_s) |
| CommArray_s | WizCommands [] |
| const int | WizCommandsSize = sizeof(WizCommands) / sizeof(CommArray_s) |
Command parsing related code.
Definition in file commands.c.
| int can_do_wiz_command | ( | player * | pl, |
| const char * | command | ||
| ) |
Check whether the specified player is able to perform a DM command.
| pl | Player being checked. |
| command | Command that 'pl' wants to perform. |
Definition at line 262 of file commands.c.
| static int compare_A | ( | const void * | a, |
| const void * | b | ||
| ) | [static] |
Compare two commands, for qsort() in init_command() and bsearch() in find_command_element().
| a | The first command |
| b | The second command |
Definition at line 219 of file commands.c.
| int execute_newserver_command | ( | object * | pl, |
| char * | command | ||
| ) |
Execute a command by player.
| pl | The player who is issuing the command. |
| command | The command. |
Definition at line 296 of file commands.c.
| CommArray_s* find_command_element | ( | char * | cmd, |
| CommArray_s * | commarray, | ||
| int | commsize | ||
| ) |
Find a command element.
| cmd | The command name. |
| commarray | The commands array to search in. |
| commsize | The commands array size. |
Definition at line 241 of file commands.c.
| void init_commands | ( | ) |
Initialize all the commands and emotes.
Sorts the commands and emotes using qsort().
Definition at line 228 of file commands.c.
Normal game commands
Definition at line 33 of file commands.c.
| const int CommandsSize = sizeof(Commands) / sizeof(CommArray_s) |
Size of normal commands
Definition at line 82 of file commands.c.
Emotion commands
Definition at line 85 of file commands.c.
| const int CommunicationCommandSize = sizeof(CommunicationCommands)/ sizeof(CommArray_s) |
Size of emotion commands
Definition at line 150 of file commands.c.
Wizard commands
Definition at line 153 of file commands.c.
| const int WizCommandsSize = sizeof(WizCommands) / sizeof(CommArray_s) |
Size of Wizard commands
Definition at line 211 of file commands.c.
1.7.4