Freeciv-3.2
|
#include "support.h"
Go to the source code of this file.
Functions | |
bool | client_start_server (void) |
void | client_kill_server (bool force) |
bool | is_server_running (void) |
bool | can_client_access_hack (void) |
void | send_client_wants_hack (const char *filename) |
void | send_save_game (const char *filename) |
void | set_ruleset (const char *ruleset) |
Returns TRUE if the client has hack access.
Definition at line 141 of file connectdlg_common.c.
Referenced by mr_menu::menus_sensitive(), real_menus_init(), real_menus_update(), fc_client::update_buttons(), and update_start_page_buttons().
Kills the server if the client has started it.
If the 'force' parameter is unset, we just do a /quit. If it's set, then we'll send a signal to the server to kill it (use this when the socket is disconnected already).
Definition at line 153 of file connectdlg_common.c.
Referenced by client_conn_close_callback(), client_start_server(), disconnect_from_server(), emergency_exit(), and handle_single_want_hack_reply().
Forks a server if it can. Returns FALSE if we find we couldn't start the server.
Definition at line 224 of file connectdlg_common.c.
Referenced by client_start_server_and_set_page(), real_set_client_page(), set_client_state(), fc_client::start_from_save(), fc_client::start_new_game(), start_new_game_callback(), start_new_game_callback(), and fc_client::start_scenario().
Tests if the client has started the server.
Definition at line 124 of file connectdlg_common.c.
Referenced by mr_menu::back_to_menu(), client_kill_server(), handle_single_want_hack_reply(), leave_callback(), leave_callback(), load_selected_game_callback(), real_set_client_page(), refresh_chat_buttons(), resend_desired_settable_options(), fc_client::start_from_save(), fc_client::start_new_game(), start_new_game_callback(), start_new_game_callback(), fc_client::start_scenario(), fc_client::switch_page(), and chatwdg::update_widgets().
If the client is capable of 'wanting hack', then the server will send the client a filename in the packet_join_game_reply packet.
This function creates the file with a suitably random string in it and then sends the string to the server. If the server can open and read the string, then the client is given hack access.
Definition at line 679 of file connectdlg_common.c.
Referenced by handle_server_join_reply().
Send server command to save game.
Definition at line 751 of file connectdlg_common.c.
Referenced by mr_menu::save_game(), mr_menu::save_game_as(), save_game_callback(), save_game_callback(), save_game_callback(), and save_game_dialog_popup().
Called by the GUI code when the user sets the ruleset. The ruleset passed in here should match one of the strings given to set_rulesets().
Definition at line 792 of file connectdlg_common.c.
Referenced by pregame_options::ruleset_change(), and ruleset_selected().