1 /* src/client/command_db.h
3 * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4 * or any later version. For details on its copyright, license, and warranties,
5 * see the file NOTICE in the root directory of the PlomRogue source package.
7 * The Command DB collects the commands available to the user by internal name,
8 * description and, optionally, components of a message to send to the server
15 #include <stdint.h> /* uint8_t */
21 char * dsc_short; /* short name of command to be used internally */
22 char * dsc_long; /* long description of command to be shown to the user */
23 char * server_msg; /* optionally start string of message to send to server*/
24 char arg; /* defines server message suffix by try_server_commands() rules */
29 struct Command * cmds; /* memory area for sequence of all Command structs */
30 uint8_t n; /* number of Command structs in database */
35 /* Return Command struct for command described by its "dsc_short" member. Return
36 * NULL if no such command is found.
38 extern struct Command * get_command(char * dsc_short);
40 /* Read in CommandDB config file. */
41 extern void init_command_db();
43 /* Free all memory allocated with init_command_db. */
44 extern void free_command_db();