![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "connection.h"
Include dependency graph for commands.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Enumerations | |
| enum | cmd_echo { CMD_ECHO_NONE = 0 , CMD_ECHO_ADMINS , CMD_ECHO_ALL } |
| enum | command_id { CMD_START_GAME = 0 , CMD_HELP , CMD_LIST , CMD_QUIT , CMD_CUT , CMD_EXPLAIN , CMD_SHOW , CMD_WALL , CMD_CONNECTMSG , CMD_VOTE , CMD_DEBUG , CMD_SET , CMD_TEAM , CMD_RULESETDIR , CMD_METAMESSAGE , CMD_METAPATCHES , CMD_METACONN , CMD_METASERVER , CMD_AITOGGLE , CMD_TAKE , CMD_OBSERVE , CMD_DETACH , CMD_CREATE , CMD_AWAY , CMD_HANDICAPPED , CMD_NOVICE , CMD_EASY , CMD_NORMAL , CMD_HARD , CMD_CHEATING , CMD_CMDLEVEL , CMD_FIRSTLEVEL , CMD_TIMEOUT_SHOW , CMD_TIMEOUT_SET , CMD_TIMEOUT_ADD , CMD_TIMEOUT_INCREASE , CMD_CANCELVOTE , CMD_IGNORE , CMD_UNIGNORE , CMD_PLAYERCOLOR , CMD_PLAYERNATION , CMD_END_GAME , CMD_SURRENDER , CMD_REMOVE , CMD_SAVE , CMD_SCENSAVE , CMD_LOAD , CMD_READ_SCRIPT , CMD_WRITE_SCRIPT , CMD_RESET , CMD_DEFAULT , CMD_LUA , CMD_KICK , CMD_DELEGATE , CMD_AICMD , CMD_FCDB , CMD_MAPIMG , CMD_RFCSTYLE , CMD_SRVID , CMD_NUM , CMD_UNRECOGNIZED , CMD_AMBIGUOUS } |
Functions | |
| const struct command * | command_by_number (int i) |
| Return command by its number. More... | |
| const char * | command_name_by_number (int i) |
| Return name of the command by commands number. More... | |
| const char * | command_name (const struct command *pcommand) |
| Return name of the command. More... | |
| const char * | command_synopsis (const struct command *pcommand) |
| Returns the synopsis text of the command (translated). More... | |
| const char * | command_short_help (const struct command *pcommand) |
| Returns the short help text of the command (translated). More... | |
| char * | command_extra_help (const struct command *pcommand) |
| Returns the extra help text of the command (translated). More... | |
| enum cmdlevel | command_level (const struct command *pcommand) |
| What is the permissions level required for running the command? More... | |
| enum cmd_echo | command_echo (const struct command *pcommand) |
| Returns the flag of the command to notify the users about its usage. More... | |
| int | command_vote_flags (const struct command *pcommand) |
| Returns a bit-wise combination of all vote flags set for this command. More... | |
| int | command_vote_percent (const struct command *pcommand) |
| Returns the vote percent required for this command to pass in a vote. More... | |
| enum cmd_echo |
| Enumerator | |
|---|---|
| CMD_ECHO_NONE | |
| CMD_ECHO_ADMINS | |
| CMD_ECHO_ALL | |
Definition at line 18 of file commands.h.
| enum command_id |
Definition at line 33 of file commands.h.
| const struct command* command_by_number | ( | int | i | ) |
Return command by its number.
Definition at line 701 of file commands.cpp.
Referenced by command_name_by_number(), debug_command(), detach_command(), handle_stdin_input_real(), load_command(), lookup_option_level(), manual_command(), may_use(), observe_command(), set_command(), show_help_command(), take_command(), team_command(), vote_command(), vote_new(), and vote_would_pass_immediately().
Returns the flag of the command to notify the users about its usage.
Definition at line 743 of file commands.cpp.
Referenced by handle_stdin_input_real().
| char* command_extra_help | ( | const struct command * | pcommand | ) |
Returns the extra help text of the command (translated).
The caller must free this string.
Definition at line 743 of file commands.cpp.
Referenced by manual_command(), and show_help_command().
| enum cmdlevel command_level | ( | const struct command * | pcommand | ) |
What is the permissions level required for running the command?
Definition at line 743 of file commands.cpp.
Referenced by handle_stdin_input_real(), manual_command(), may_use(), and show_help_command().
| const char* command_name | ( | const struct command * | pcommand | ) |
Return name of the command.
Definition at line 710 of file commands.cpp.
Referenced by manual_command(), show_help_command(), and vote_new().
| const char* command_name_by_number | ( | int | i | ) |
Return name of the command by commands number.
Definition at line 718 of file commands.cpp.
Referenced by cmd_reply_line(), command_generator(), handle_stdin_input_real(), helparg_accessor(), is_cmdlevel_arg1(), is_cmdlevel_arg2(), is_command(), is_connection(), is_create_arg2(), is_delegate_arg1(), is_enum_option_value(), is_fcdb(), is_filename(), is_help(), is_list(), is_lua(), is_mapimg(), is_option_level(), is_player(), is_reset(), is_server_option(), is_vote(), and show_help_command_list().
| const char* command_short_help | ( | const struct command * | pcommand | ) |
Returns the short help text of the command (translated).
Definition at line 734 of file commands.cpp.
Referenced by manual_command(), and show_help_command().
| const char* command_synopsis | ( | const struct command * | pcommand | ) |
Returns the synopsis text of the command (translated).
Definition at line 726 of file commands.cpp.
Referenced by debug_command(), detach_command(), load_command(), lookup_option_level(), manual_command(), observe_command(), set_command(), show_help_command(), take_command(), team_command(), and vote_command().
| int command_vote_flags | ( | const struct command * | pcommand | ) |
Returns a bit-wise combination of all vote flags set for this command.
Definition at line 774 of file commands.cpp.
Referenced by vote_new(), and vote_would_pass_immediately().
| int command_vote_percent | ( | const struct command * | pcommand | ) |
Returns the vote percent required for this command to pass in a vote.
Definition at line 782 of file commands.cpp.
Referenced by vote_new(), and vote_would_pass_immediately().