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_free(void);
27
28void cmd_reply(enum command_id cmd, struct connection *caller,
29 enum rfc_status rfc_status, const char *format, ...)
31
32bool handle_stdin_input(struct connection *caller, char *str);
33bool handle_stdin_input_free(struct connection *caller, char *str);
34void set_ai_level_direct(struct player *pplayer, enum ai_level level);
35bool read_init_script(struct connection *caller, const char *script_filename,
36 bool from_cmdline, bool check);
37bool set_rulesetdir(struct connection *caller, const char *str, bool check,
38 int read_recursion);
40void show_players(struct connection *caller);
41
43 const char *ai,
44 bool check,
45 struct nation_type *pnation,
47 char *buf, size_t buflen);
49 const char *ai,
50 bool check,
52 char *buf, size_t buflen);
53
54bool load_command(struct connection *caller,
55 const char *filename, bool check, bool cmdline_load);
56bool start_command(struct connection *caller, bool check, bool notify);
57
59 struct player *pplayer);
60
61/* for sernet.c in initing a new connection */
63
65
67
69
70#ifdef FREECIV_HAVE_LIBREADLINE
71char **freeciv_completion(const char *text, int start, int end);
72#endif
73
74#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:1630
void notify_if_first_access_level_is_available(void)
Definition stdinhand.c:1446
bool conn_is_kicked(struct connection *pconn, int *time_remaining)
Definition stdinhand.c:6279
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:806
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:246
void show_players(struct connection *caller)
Definition stdinhand.c:6751
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:994
enum cmdlevel access_level_for_next_connection(void)
Definition stdinhand.c:1432
bool handle_stdin_input_free(struct connection *caller, char *str)
Definition stdinhand.c:4432
void set_ai_level_direct(struct player *pplayer, enum ai_level level)
Definition stdinhand.c:2000
bool read_init_script(struct connection *caller, const char *script_filename, bool from_cmdline, bool check)
Definition stdinhand.c:1167
void stdinhand_free(void)
Definition stdinhand.c:258
bool set_rulesetdir(struct connection *caller, const char *str, bool check, int read_recursion)
Definition stdinhand.c:3973
bool load_command(struct connection *caller, const char *filename, bool check, bool cmdline_load)
Definition stdinhand.c:3786
bool start_command(struct connection *caller, bool check, bool notify)
Definition stdinhand.c:6113
struct strvec * get_init_script_choices(void)
Definition stdinhand.c:1268
void bool handle_stdin_input(struct connection *caller, char *str)
Definition stdinhand.c:4424
void toggle_ai_player_direct(struct connection *caller, struct player *pplayer)
Definition stdinhand.c:700
#define fc__attribute(x)
Definition support.h:99