Freeciv-3.1
|
#include "fc_prehdrs.h"
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fcintl.h"
#include "fcthread.h"
#include "log.h"
#include "mem.h"
#include "netintf.h"
#include "netfile.h"
#include "support.h"
#include "timing.h"
#include "capstr.h"
#include "connection.h"
#include "dataio.h"
#include "game.h"
#include "map.h"
#include "version.h"
#include "console.h"
#include "plrhand.h"
#include "settings.h"
#include "srv_main.h"
#include "meta.h"
Go to the source code of this file.
Functions | |
const char * | default_meta_patches_string (void) |
const char * | default_meta_message_string (void) |
const char * | get_meta_patches_string (void) |
const char * | get_meta_message_string (void) |
const char * | get_user_meta_message_string (void) |
void | maybe_automatic_meta_message (const char *automatic) |
void | set_meta_patches_string (const char *string) |
void | set_meta_message_string (const char *string) |
void | set_user_meta_message_string (const char *string) |
char * | meta_addr_port (void) |
void | server_close_meta (void) |
bool | server_open_meta (bool persistent) |
bool | is_metaserver_open (void) |
bool | send_server_info_to_metaserver (enum meta_flag flag) |
Variables | |
static bool | server_is_open = FALSE |
static bool | persistent_meta_connection = FALSE |
static int | meta_retry_wait = 0 |
static char | meta_patches [256] = "" |
static char | meta_message [256] = "" |
const char * default_meta_message_string | ( | void | ) |
Return static string with default info line to send to metaserver.
Definition at line 90 of file meta.c.
Referenced by establish_new_connection(), server_open_meta(), set_user_meta_message_string(), srv_prepare(), and write_init_script().
const char * default_meta_patches_string | ( | void | ) |
The default metaserver patches for this server
Definition at line 82 of file meta.c.
Referenced by server_open_meta(), sg_load_game(), sg_load_game(), and write_init_script().
const char * get_meta_message_string | ( | void | ) |
The metaserver message
Definition at line 114 of file meta.c.
Referenced by send_lanserver_response(), and write_init_script().
const char * get_meta_patches_string | ( | void | ) |
The metaserver patches
Definition at line 106 of file meta.c.
Referenced by sg_save_game(), and write_init_script().
const char * get_user_meta_message_string | ( | void | ) |
The metaserver message set by user
Definition at line 136 of file meta.c.
Referenced by maybe_automatic_meta_message().
bool is_metaserver_open | ( | void | ) |
Are we sending info to the metaserver?
Definition at line 482 of file meta.c.
Referenced by metaconnection_command(), metamessage_action(), metamessage_command(), and metapatches_command().
void maybe_automatic_meta_message | ( | const char * | automatic | ) |
Update meta message. Set it to user meta message, if it is available. Otherwise use provided message. It is ok to call this with NULL message. Then it only replaces current meta message with user meta message if available.
Definition at line 151 of file meta.c.
Referenced by establish_new_connection(), and srv_prepare().
char * meta_addr_port | ( | void | ) |
Return string describing both metaserver name and port.
Definition at line 202 of file meta.c.
Referenced by close_metaserver_connection(), metaserver_command(), open_metaserver_connection(), sg_save_game(), srv_prepare(), and write_init_script().
Control when we send info to the metaserver.
Definition at line 490 of file meta.c.
Referenced by close_connections_and_socket(), close_metaserver_connection(), create_command_newcomer(), create_command_pregame(), establish_new_connection(), generate_players(), metamessage_action(), metamessage_command(), metapatches_command(), open_metaserver_connection(), server_sniff_all_input(), set_command(), srv_prepare(), srv_ready(), srv_running(), and srv_scores().
void server_close_meta | ( | void | ) |
Stop sending updates to metaserver
Definition at line 454 of file meta.c.
Referenced by close_connections_and_socket(), and close_metaserver_connection().
Lookup the correct address for the metaserver.
Definition at line 463 of file meta.c.
Referenced by open_metaserver_connection(), and srv_prepare().
void set_meta_message_string | ( | const char * | string | ) |
Set the metaserver message string
Definition at line 179 of file meta.c.
Referenced by maybe_automatic_meta_message(), server_open_meta(), server_sniff_all_input(), and set_user_meta_message_string().
void set_meta_patches_string | ( | const char * | string | ) |
Set the metaserver patches string
Definition at line 171 of file meta.c.
Referenced by metapatches_command(), server_open_meta(), sg_load_game(), and sg_load_game().
void set_user_meta_message_string | ( | const char * | string | ) |
Set user defined metaserver message string
Definition at line 187 of file meta.c.
Referenced by metamessage_action(), and metamessage_command().
|
static |
Definition at line 73 of file meta.c.
Referenced by get_meta_message_string(), server_open_meta(), and set_meta_message_string().
|
static |
Definition at line 72 of file meta.c.
Referenced by get_meta_patches_string(), server_open_meta(), and set_meta_patches_string().
|
static |
Definition at line 70 of file meta.c.
Referenced by send_server_info_to_metaserver(), and server_open_meta().
Definition at line 69 of file meta.c.
Referenced by server_close_meta(), and server_open_meta().
Definition at line 68 of file meta.c.
Referenced by is_metaserver_open(), send_server_info_to_metaserver(), server_close_meta(), and server_open_meta().