From 24c9e6ff66c6386a182b0fe5eef5f371793b468e Mon Sep 17 00:00:00 2001 From: truelight Date: Sat, 15 Jan 2005 20:09:16 +0000 Subject: (svn r1527) -Add: RCon (Remote Connection). A server can set: 'set rcon_pw ' Which enables rcon. A client can now do: 'rcon ""' The command will be executed on the server. (guru3) -Fix: 'kick 1' did crash dedicated servers -Fix: server password is now correctly saved !!Warning!!: do not give your rcon password to people you do not thrust! --- network.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'network.h') diff --git a/network.h b/network.h index c03aedcca..808437730 100644 --- a/network.h +++ b/network.h @@ -42,12 +42,15 @@ #define NETWORK_VEHICLE_TYPES 5 #define NETWORK_STATION_TYPES 5 -#define NETWORK_NAME_LENGTH 80 -#define NETWORK_HOSTNAME_LENGTH 80 -#define NETWORK_REVISION_LENGTH 10 -#define NETWORK_PASSWORD_LENGTH 20 -#define NETWORK_PLAYERS_LENGTH 200 -#define NETWORK_CLIENT_NAME_LENGTH 25 +enum { + NETWORK_NAME_LENGTH = 80, + NETWORK_HOSTNAME_LENGTH = 80, + NETWORK_REVISION_LENGTH = 10, + NETWORK_PASSWORD_LENGTH = 20, + NETWORK_PLAYERS_LENGTH = 200, + NETWORK_CLIENT_NAME_LENGTH = 25, + NETWORK_RCONCOMMAND_LENGTH = 500, +}; // This is the struct used by both client and server // some fields will be empty on the client (like game_password) by default @@ -71,6 +74,7 @@ typedef struct NetworkGameInfo { uint16 map_height; // Map height byte map_set; // Graphical set bool dedicated; // Is this a dedicated server? + char rcon_password[NETWORK_PASSWORD_LENGTH]; // RCon password for the server. "" if rcon is disabled } NetworkGameInfo; typedef struct NetworkPlayerInfo { @@ -155,6 +159,10 @@ VARDEF uint32 _network_server_bind_ip; VARDEF char _network_server_bind_ip_host[NETWORK_HOSTNAME_LENGTH]; VARDEF bool _is_network_server; // Does this client wants to be a network-server? VARDEF char _network_server_name[NETWORK_NAME_LENGTH]; +VARDEF char _network_server_password[NETWORK_PASSWORD_LENGTH]; +VARDEF char _network_rcon_password[NETWORK_PASSWORD_LENGTH]; + +VARDEF uint16 _redirect_console_to_client; VARDEF uint16 _network_sync_freq; VARDEF uint8 _network_frame_freq; -- cgit v1.2.3-54-g00ecf