diff options
author | dominik <dominik@openttd.org> | 2004-12-18 18:58:03 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-12-18 18:58:03 +0000 |
commit | 853c11d301cd5ad662b1c73b58f2581f0e49997a (patch) | |
tree | 5e845319d36cb833763f462a08f7be2e4c008118 /network_gui.c | |
parent | b9779176d5b7ed3277e5d23317c1511a417b04a4 (diff) | |
download | openttd-853c11d301cd5ad662b1c73b58f2581f0e49997a.tar.xz |
(svn r1162) The server list can now be automatically filled from the config file. Add a section [servers] with the addresses each in a new line. Those will be checked upon OpenTTD startup.
Diffstat (limited to 'network_gui.c')
-rw-r--r-- | network_gui.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/network_gui.c b/network_gui.c index 06216126a..dfc989a3b 100644 --- a/network_gui.c +++ b/network_gui.c @@ -317,22 +317,7 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e) break; case WE_ON_EDIT_TEXT: { - byte *b = e->edittext.str; - if (*b != 0) { - const byte *port = NULL; - const byte *player = NULL; - uint16 rport; - - ttd_strlcpy(_network_default_ip, b, lengthof(_network_default_ip)); - rport = NETWORK_DEFAULT_PORT; - - ParseConnectionString(&player, &port, b); - - if (player != NULL) _network_playas = atoi(player); - if (port != NULL) rport = atoi(port); - - NetworkQueryServer(b, rport, true); - } + AddServer(e->edittext.str); } break; case WE_CREATE: { @@ -387,7 +372,6 @@ void ShowNetworkGameWindow() Window *w; DeleteWindowById(WC_NETWORK_WINDOW, 0); -// NetworkLobbyInit(); w = AllocateWindowDesc(&_network_game_window_desc); ttd_strlcpy(_edit_str_buf, _network_player_name, MAX_QUERYSTR_LEN); w->vscroll.cap = 8; |