Freeciv-3.3
Loading...
Searching...
No Matches
Enumerations | Functions
commands.h File Reference
#include "connection.h"

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_RESTRICTED , CMD_NOVICE , CMD_EASY , CMD_NORMAL ,
  CMD_HARD , CMD_CHEATING , CMD_CMDLEVEL , CMD_FIRSTLEVEL ,
  CMD_TIMEOUT , 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_LOCK , CMD_UNLOCK ,
  CMD_RFCSTYLE , CMD_SRVID , CMD_NUM , CMD_UNRECOGNIZED ,
  CMD_AMBIGUOUS
}
 

Functions

const struct commandcommand_by_number (int i)
 
const charcommand_name_by_number (int i)
 
const charcommand_name (const struct command *pcommand)
 
const charcommand_synopsis (const struct command *pcommand)
 
const charcommand_short_help (const struct command *pcommand)
 
charcommand_extra_help (const struct command *pcommand)
 
enum cmdlevel command_level (const struct command *pcommand)
 
enum cmd_echo command_echo (const struct command *pcommand)
 
int command_vote_flags (const struct command *pcommand)
 
int command_vote_percent (const struct command *pcommand)
 

Enumeration Type Documentation

◆ cmd_echo

Enumerator
CMD_ECHO_NONE 
CMD_ECHO_ADMINS 
CMD_ECHO_ALL 

Definition at line 20 of file commands.h.

◆ command_id

Enumerator
CMD_START_GAME 
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_RESTRICTED 
CMD_NOVICE 
CMD_EASY 
CMD_NORMAL 
CMD_HARD 
CMD_CHEATING 
CMD_CMDLEVEL 
CMD_FIRSTLEVEL 
CMD_TIMEOUT 
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_LOCK 
CMD_UNLOCK 
CMD_RFCSTYLE 
CMD_SRVID 
CMD_NUM 
CMD_UNRECOGNIZED 
CMD_AMBIGUOUS 

Definition at line 35 of file commands.h.

Function Documentation

◆ command_by_number()

const struct command * command_by_number ( int  i)

◆ command_echo()

enum cmd_echo command_echo ( const struct command pcommand)

Returns the flag of the command to notify the users about its usage.

Definition at line 802 of file commands.c.

Referenced by handle_stdin_input_real().

◆ command_extra_help()

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 779 of file commands.c.

Referenced by manual_commands(), and show_help_command().

◆ command_level()

enum cmdlevel command_level ( const struct command pcommand)

What is the permissions level required for running the command?

Definition at line 794 of file commands.c.

Referenced by handle_stdin_input_real(), manual_commands(), may_use(), and show_help_command().

◆ command_name()

const char * command_name ( const struct command pcommand)

Return name of the command

Definition at line 746 of file commands.c.

Referenced by manual_commands(), show_help_command(), and vote_new().

◆ command_name_by_number()

const char * command_name_by_number ( int  i)

Return name of the command by commands number.

Definition at line 754 of file commands.c.

Referenced by cmd_reply_line(), command_named(), handle_stdin_input_real(), helparg_accessor(), and show_help_command_list().

◆ command_short_help()

const char * command_short_help ( const struct command pcommand)

Returns the short help text of the command (translated).

Definition at line 770 of file commands.c.

Referenced by manual_commands(), and show_help_command().

◆ command_synopsis()

const char * command_synopsis ( const struct command pcommand)

◆ command_vote_flags()

int command_vote_flags ( const struct command pcommand)

Returns a bit-wise combination of all vote flags set for this command.

Definition at line 810 of file commands.c.

Referenced by vote_new(), and vote_would_pass_immediately().

◆ command_vote_percent()

int command_vote_percent ( const struct command pcommand)

Returns the vote percent required for this command to pass in a vote.

Definition at line 818 of file commands.c.

Referenced by vote_new(), and vote_would_pass_immediately().