Freeciv-3.3
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
29void cmd_reply(enum command_id cmd, struct connection *caller,
30 enum rfc_status rfc_status, const char *format, ...)
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);
41void show_players(struct connection *caller);
42
44 const char *ai,
45 bool check,
46 struct nation_type *pnation,
48 char *buf, size_t buflen);
50 const char *ai,
51 bool check,
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
60 struct player *pplayer);
61
62/* for sernet.c in initing a new connection */
64
66
68
70
71#ifdef FREECIV_HAVE_LIBREADLINE
72char **freeciv_completion(const char *text, int start, int end);
73#endif
74
75#endif /* FC__STDINHAND_H */
#define str
Definition astring.c:76
command_id
Definition commands.h:35
char * incite_cost
Definition comments.c:76
rfc_status
Definition console.h:35
const char * name
Definition inputfile.c:127
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
void set_running_game_access_level(void)
Definition stdinhand.c:1635
void notify_if_first_access_level_is_available(void)
Definition stdinhand.c:1451
void stdinhand_turn(void)
Definition stdinhand.c:256
bool conn_is_kicked(struct connection *pconn, int *time_remaining)
Definition stdinhand.c:6284
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:812
void cmd_reply(enum command_id cmd, struct connection *caller, enum rfc_status rfc_status, const char *format,...) fc__attribute((__format__(__printf__
void stdinhand_init(void)
Definition stdinhand.c:243
void show_players(struct connection *caller)
Definition stdinhand.c:6756
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:996
enum cmdlevel access_level_for_next_connection(void)
Definition stdinhand.c:1437
bool handle_stdin_input_free(struct connection *caller, char *str)
Definition stdinhand.c:4437
void set_ai_level_direct(struct player *pplayer, enum ai_level level)
Definition stdinhand.c:2005
bool read_init_script(struct connection *caller, const char *script_filename, bool from_cmdline, bool check)
Definition stdinhand.c:1169
void stdinhand_free(void)
Definition stdinhand.c:264
bool set_rulesetdir(struct connection *caller, const char *str, bool check, int read_recursion)
Definition stdinhand.c:3978
bool load_command(struct connection *caller, const char *filename, bool check, bool cmdline_load)
Definition stdinhand.c:3791
bool start_command(struct connection *caller, bool check, bool notify)
Definition stdinhand.c:6118
struct strvec * get_init_script_choices(void)
Definition stdinhand.c:1270
void bool handle_stdin_input(struct connection *caller, char *str)
Definition stdinhand.c:4429
void toggle_ai_player_direct(struct connection *caller, struct player *pplayer)
Definition stdinhand.c:706
#define fc__attribute(x)
Definition support.h:99