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)
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
17 #include "chat.h" /* SERVER_COMMAND_PREFIX */
18 #include "connection.h" /* enum cmdlevel */
25 void stdinhand_init(void);
26 void stdinhand_turn(void);
27 void stdinhand_free(void);
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)));
33 bool handle_stdin_input(struct connection
*caller
, char *str
);
34 void set_ai_level_direct(struct player
*pplayer
, enum ai_level level
);
35 bool read_init_script(struct connection
*caller
, char *script_filename
,
36 bool from_cmdline
, bool check
);
37 void show_players(struct connection
*caller
);
39 enum rfc_status
create_command_newcomer(const char *name
,
42 struct nation_type
*pnation
,
43 struct player
**newplayer
,
44 char *buf
, size_t buflen
);
45 enum rfc_status
create_command_pregame(const char *name
,
48 struct player
**newplayer
,
49 char *buf
, size_t buflen
);
51 bool load_command(struct connection
*caller
,
52 const char *filename
, bool check
, bool cmdline_load
);
53 bool start_command(struct connection
*caller
, bool check
, bool notify
);
55 void toggle_ai_player_direct(struct connection
*caller
,
56 struct player
*pplayer
);
58 /* for sernet.c in initing a new connection */
59 enum cmdlevel
access_level_for_next_connection(void);
61 void notify_if_first_access_level_is_available(void);
63 bool conn_is_kicked(struct connection
*pconn
, int *time_remaining
);
65 void set_running_game_access_level(void);
67 #ifdef FREECIV_HAVE_LIBREADLINE
68 char **freeciv_completion(const char *text
, int start
, int end
);
71 #endif /* FC__STDINHAND_H */