Freeciv-3.2: /fast/freeciv/nightly/S3_2/server/stdinhand.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
stdinhand.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__STDINHAND_H
14#define FC__STDINHAND_H
15
16/* common */
17#include "chat.h" /* SERVER_COMMAND_PREFIX */
18#include "connection.h" /* enum cmdlevel */
19#include "fc_types.h"
20
21/* server */
22#include "commands.h"
23#include "console.h"
24
25void stdinhand_init(void);
26void stdinhand_turn(void);
27void stdinhand_free(void);
28
29 void cmd_reply(enum command_id cmd, struct connection *caller,
30 enum rfc_status rfc_status, const char *format, ...)
31 fc__attribute((__format__ (__printf__, 4, 5)));
32
33bool handle_stdin_input(struct connection *caller, char *str);
34bool handle_stdin_input_free(struct connection *caller, char *str);
35void set_ai_level_direct(struct player *pplayer, enum ai_level level);
36bool read_init_script(struct connection *caller, const char *script_filename,
37 bool from_cmdline, bool check);
38bool set_rulesetdir(struct connection *caller, const char *str, bool check,
39 int read_recursion);
40 struct strvec *get_init_script_choices(void);
41void show_players(struct connection *caller);
42
43 enum rfc_status create_command_newcomer(const char *name,
44 const char *ai,
45 bool check,
46 struct nation_type *pnation,
47 struct player **newplayer,
48 char *buf, size_t buflen);
49 enum rfc_status create_command_pregame(const char *name,
50 const char *ai,
51 bool check,
52 struct player **newplayer,
53 char *buf, size_t buflen);
54
55bool load_command(struct connection *caller,
56 const char *filename, bool check, bool cmdline_load);
57bool start_command(struct connection *caller, bool check, bool notify);
58
59void toggle_ai_player_direct(struct connection *caller,
60 struct player *pplayer);
61
62/* for sernet.c in initing a new connection */
63 enum cmdlevel access_level_for_next_connection(void);
64
65void notify_if_first_access_level_is_available(void);
66
67bool conn_is_kicked(struct connection *pconn, int *time_remaining);
68
69void set_running_game_access_level(void);
70
71#ifdef FREECIV_HAVE_LIBREADLINE
72char **freeciv_completion(const char *text, int start, int end);
73#endif
74
75#endif /* FC__STDINHAND_H */
str
#define str
Definition astring.c:76
chat.h
commands.h
command_id
command_id
Definition commands.h:35
incite_cost
char * incite_cost
Definition comments.c:74
connection.h
console.h
rfc_status
rfc_status
Definition console.h:35
fc_types.h
name
const char * name
Definition inputfile.c:127
level
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
set_running_game_access_level
void set_running_game_access_level(void)
Definition stdinhand.c:1634
notify_if_first_access_level_is_available
void notify_if_first_access_level_is_available(void)
Definition stdinhand.c:1450
stdinhand_turn
void stdinhand_turn(void)
Definition stdinhand.c:255
conn_is_kicked
bool conn_is_kicked(struct connection *pconn, int *time_remaining)
Definition stdinhand.c:6278
create_command_newcomer
enum rfc_status create_command_newcomer(const char *name, const char *ai, bool check, struct nation_type *pnation, struct player **newplayer, char *buf, size_t buflen)
Definition stdinhand.c:811
cmd_reply
void cmd_reply(enum command_id cmd, struct connection *caller, enum rfc_status rfc_status, const char *format,...) fc__attribute((__format__(__printf__
stdinhand_init
void stdinhand_init(void)
Definition stdinhand.c:242
show_players
void show_players(struct connection *caller)
Definition stdinhand.c:6750
create_command_pregame
enum rfc_status create_command_pregame(const char *name, const char *ai, bool check, struct player **newplayer, char *buf, size_t buflen)
Definition stdinhand.c:995
access_level_for_next_connection
enum cmdlevel access_level_for_next_connection(void)
Definition stdinhand.c:1436
handle_stdin_input_free
bool handle_stdin_input_free(struct connection *caller, char *str)
Definition stdinhand.c:4434
set_ai_level_direct
void set_ai_level_direct(struct player *pplayer, enum ai_level level)
Definition stdinhand.c:2004
read_init_script
bool read_init_script(struct connection *caller, const char *script_filename, bool from_cmdline, bool check)
Definition stdinhand.c:1168
stdinhand_free
void stdinhand_free(void)
Definition stdinhand.c:263
set_rulesetdir
bool set_rulesetdir(struct connection *caller, const char *str, bool check, int read_recursion)
Definition stdinhand.c:3975
load_command
bool load_command(struct connection *caller, const char *filename, bool check, bool cmdline_load)
Definition stdinhand.c:3788
start_command
bool start_command(struct connection *caller, bool check, bool notify)
Definition stdinhand.c:6112
get_init_script_choices
struct strvec * get_init_script_choices(void)
Definition stdinhand.c:1269
handle_stdin_input
void bool handle_stdin_input(struct connection *caller, char *str)
Definition stdinhand.c:4426
toggle_ai_player_direct
void toggle_ai_player_direct(struct connection *caller, struct player *pplayer)
Definition stdinhand.c:705
connection
Definition connection.h:136
nation_type
Definition nation.h:98
player
Definition player.h:247
strvec
Definition string_vector.c:29
fc__attribute
#define fc__attribute(x)
Definition support.h:99