Crossfire Server, Trunk  R20513
Functions | Variables
commands.c File Reference

Contains the definition for all in-game commands a player can issue. More...

#include "global.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "commands.h"
#include "sproto.h"
Include dependency graph for commands.c:

Go to the source code of this file.

Functions

static int compare_A (const void *a, const void *b)
 Comparison function for 2 command_array_struct. More...
 
void init_commands (void)
 Sorts the command arrays for easy search through bsearch(). More...
 

Variables

command_array_struct Commands []
 Normal game commands. More...
 
const int CommandsSize = sizeof(Commands)/sizeof(command_array_struct)
 Length of Commands array. More...
 
command_array_struct CommunicationCommands []
 Chat/shout related commands. More...
 
const int CommunicationCommandSize = sizeof(CommunicationCommands)/sizeof(command_array_struct)
 Length of the CommunicationCommands array. More...
 
command_array_struct WizCommands []
 Wizard commands. More...
 
const int WizCommandsSize = sizeof(WizCommands)/sizeof(command_array_struct)
 Length of WizCommands array. More...
 

Detailed Description

Contains the definition for all in-game commands a player can issue.

Definition in file commands.c.

Function Documentation

static int compare_A ( const void *  a,
const void *  b 
)
static

Comparison function for 2 command_array_struct.

Parameters
a
bcommands to compare.
Return values
-1a is less than b.
0a equals b.
1a is greater than b.

Definition at line 279 of file commands.c.

Referenced by init_commands().

Here is the caller graph for this function:

void init_commands ( void  )

Sorts the command arrays for easy search through bsearch().

Definition at line 286 of file commands.c.

References CommandsSize, and compare_A().

Referenced by init().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Normal game commands.

Definition at line 36 of file commands.c.

Referenced by execute_newserver_command(), and show_commands().

const int CommandsSize = sizeof(Commands)/sizeof(command_array_struct)

Length of Commands array.

Definition at line 126 of file commands.c.

Referenced by execute_newserver_command(), init_commands(), and show_commands().

command_array_struct CommunicationCommands[]

Chat/shout related commands.

Definition at line 129 of file commands.c.

Referenced by execute_newserver_command(), and show_commands().

const int CommunicationCommandSize = sizeof(CommunicationCommands)/sizeof(command_array_struct)

Length of the CommunicationCommands array.

Definition at line 199 of file commands.c.

Referenced by execute_newserver_command(), and show_commands().

command_array_struct WizCommands[]

Wizard commands.

Definition at line 202 of file commands.c.

Referenced by execute_newserver_command(), and show_commands().

const int WizCommandsSize = sizeof(WizCommands)/sizeof(command_array_struct)

Length of WizCommands array.

Definition at line 265 of file commands.c.

Referenced by execute_newserver_command(), and show_commands().