Freeciv-3.2
Loading...
Searching...
No Matches
Functions
connectdlg_common.h File Reference
#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)
 

Function Documentation

◆ can_client_access_hack()

bool can_client_access_hack ( void  )

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().

◆ client_kill_server()

void client_kill_server ( bool  force)

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().

◆ client_start_server()

bool client_start_server ( void  )

◆ is_server_running()

bool is_server_running ( void  )

◆ send_client_wants_hack()

void send_client_wants_hack ( const char filename)

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_save_game()

void send_save_game ( const char filename)

◆ set_ruleset()

void set_ruleset ( const char ruleset)

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().