summaryrefslogtreecommitdiff
path: root/network.h
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-20 22:14:39 +0000
committerdominik <dominik@openttd.org>2004-12-20 22:14:39 +0000
commit7cfaa8a418cf5e04d66e3b4207b13a29db134145 (patch)
tree29c55a04aa27eeacd62949e6621a682a22dc3cc0 /network.h
parent3bbea05a93f922a7e3c98f5474748027032ef2a9 (diff)
downloadopenttd-7cfaa8a418cf5e04d66e3b4207b13a29db134145.tar.xz
(svn r1194) Feature: You can now add and remove servers from the server list. Those will be remembered until you delete them by pressing the Delete key.
Diffstat (limited to 'network.h')
-rw-r--r--network.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/network.h b/network.h
index ac42f55ce..6494d2254 100644
--- a/network.h
+++ b/network.h
@@ -101,6 +101,7 @@ typedef struct NetworkGameList {
uint32 ip;
uint16 port;
bool online; // False if the server did not respond (default status)
+ bool manually; // True if the server was added manually
struct NetworkGameList *next;
} NetworkGameList;
@@ -132,7 +133,7 @@ VARDEF NetworkClientInfo _network_client_info[MAX_CLIENT_INFO];
VARDEF char _network_player_name[NETWORK_NAME_LENGTH];
VARDEF char _network_default_ip[NETWORK_HOSTNAME_LENGTH];
#define MAX_SAVED_SERVERS 10
-VARDEF char *_network_server_list[MAX_SAVED_SERVERS];
+VARDEF char *_network_host_list[MAX_SAVED_SERVERS];
VARDEF uint16 _network_own_client_index;
VARDEF char _network_unique_id[NETWORK_NAME_LENGTH]; // Our own unique ID
@@ -194,5 +195,7 @@ VARDEF byte _network_playas; // an id to play as..
void ParseConnectionString(const byte **player, const byte **port, byte *connection_string);
void NetworkUpdateClientInfo(uint16 client_index);
void NetworkAddServer(const byte *b);
+void NetworkRebuildHostList();
+NetworkGameList *NetworkQueryServer(const byte* host, unsigned short port, bool game_info);
#endif /* NETWORK_H */