Freeciv-3.3: /fast/freeciv/nightly/main/server/commands.c File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
commands.c File Reference
`#include "fcintl.h"`
`#include "connection.h"`
`#include "mapimg.h"`
`#include "commands.h"`
`#include "voting.h"`
`#include "difficulty.h"`

Go to the source code of this file.

## Data Structures

struct | command

## Macros

#define | SYN_ORIG_(String) "*" String
#define | SYN_TRANS_(String) ('*' == String[0] ? String + 1 : _(String))

## Functions

const struct command * | command_by_number (int i)
const char * | command_name (const struct command *pcommand)
const char * | command_name_by_number (int i)
const char * | command_synopsis (const struct command *pcommand)
const char * | command_short_help (const struct command *pcommand)
char * | command_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)

## Variables

static struct command | commands []

## Macro Definition Documentation

## ◆ SYN_ORIG_

#define SYN_ORIG_ | ( |  | String | ) | "*" String

Definition at line 33 of file commands.c.

## ◆ SYN_TRANS_

#define SYN_TRANS_ | ( |  | String | ) | ('*' == String[0] ? String + 1 : _(String))

Definition at line 35 of file commands.c.

## Function Documentation

## ◆ command_by_number()

const struct command * command_by_number | ( | int | i | ) |

Return command by its number.

Definition at line 734 of file commands.c.

Referenced by command_name_by_number(), debug_command(), detach_command(), handle_stdin_input_real(), load_command(), lock_command(), manual_commands(), may_use(), observe_command(), set_command(), show_help_command(), take_command(), team_command(), timeout_command(), unlock_command(), vote_command(), vote_new(), and vote_would_pass_immediately().

## ◆ 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 799 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 776 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 791 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 743 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 751 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 767 of file commands.c.

Referenced by manual_commands(), and show_help_command().

## ◆ command_synopsis()

const char * command_synopsis | ( | const struct command * | pcommand | ) |

Returns the synopsis text of the command (translated).

Definition at line 759 of file commands.c.

Referenced by debug_command(), detach_command(), load_command(), lock_command(), manual_commands(), observe_command(), set_command(), show_help_command(), take_command(), team_command(), timeout_command(), unlock_command(), and vote_command().

## ◆ 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 807 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 815 of file commands.c.

Referenced by vote_new(), and vote_would_pass_immediately().

## Variable Documentation

## ◆ commands

struct command commands[]

static

Definition at line 52 of file commands.c.

Referenced by command_by_number().