|
Crossfire Server, Branch 1.12
R12190
|
This file deals with administrative commands from the client. More...

Go to the source code of this file.
Defines | |
| #define | tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C)-'A'+'a' : (C)) |
| Simple macro to convert a letter to lowercase. | |
Functions | |
| int | command_fire (object *op, char *params) |
| Player wants to start furing. | |
| int | command_fire_stop (object *op, char *params) |
| Player wants to stop firing. | |
| int | command_run (object *op, char *params) |
| Player wants to start running. | |
| int | command_run_stop (object *op, char *params) |
| Player wants to stop running. | |
| static int | compare_A (const void *a, const void *b) |
| Compare function for commands. | |
| int | execute_newserver_command (object *pl, char *command) |
| Player issued a command, let's handle it. | |
| static command_array_struct * | find_command_element (const char *cmd, command_array_struct *commarray, int commsize) |
| Finds the specified command in the command array. | |
This file deals with administrative commands from the client.
Definition in file c_new.c.
| #define tolower | ( | C | ) | (((C) >= 'A' && (C) <= 'Z') ? (C)-'A'+'a' : (C)) |
Simple macro to convert a letter to lowercase.
Definition at line 42 of file c_new.c.
Referenced by cast_consecrate(), do_map_index(), execute_newserver_command(), main(), re_match_token(), strcasecmp(), strcasestr_local(), strncasecmp(), and strtoint().
| int command_fire | ( | object * | op, |
| char * | params | ||
| ) |
Player wants to start furing.
| op | player. |
| params | additional parameters. |
Definition at line 206 of file c_new.c.
References draw_ext_info(), move_player(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, and NDI_UNIQUE.

| int command_fire_stop | ( | object * | op, |
| char * | params | ||
| ) |
| int command_run | ( | object * | op, |
| char * | params | ||
| ) |
Player wants to start running.
| op | player. |
| params | additional parameters. |
Definition at line 168 of file c_new.c.
References draw_ext_info(), move_player(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, and NDI_UNIQUE.

| int command_run_stop | ( | object * | op, |
| char * | params | ||
| ) |
| static int compare_A | ( | const void * | a, |
| const void * | b | ||
| ) | [static] |
Compare function for commands.
| a | |
| b | commands to compare. |
| -1 | a is less then b. |
| 0 | a and b are equals. |
| 1 | a is greater than b. |
Definition at line 58 of file c_new.c.
Referenced by find_command_element().

| int execute_newserver_command | ( | object * | pl, |
| char * | command | ||
| ) |
Player issued a command, let's handle it.
This function is called from the new client/server code.
| pl | player who is issuing the command |
| command | the actual command with its arguments. |
Definition at line 98 of file c_new.c.
References Commands, CommandsSize, CommunicationCommands, CommunicationCommandSize, draw_ext_info_format(), find_command_element(), find_plugin_command(), FLAG_WIZ, command_array_struct::func, llevDebug, LOG(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, QUERY_FLAG, command_array_struct::time, tolower, WizCommands, and WizCommandsSize.
Referenced by new_player_cmd().


| static command_array_struct* find_command_element | ( | const char * | cmd, |
| command_array_struct * | commarray, | ||
| int | commsize | ||
| ) | [static] |
Finds the specified command in the command array.
Utility function.
| cmd | command to find. Will be put to lowercase. |
| commarray | commands to search into. |
| commsize | length of commarray. |
Definition at line 75 of file c_new.c.
References compare_A(), and command_array_struct::name.
Referenced by execute_newserver_command().


1.7.6.1