From 853c11d301cd5ad662b1c73b58f2581f0e49997a Mon Sep 17 00:00:00 2001 From: dominik Date: Sat, 18 Dec 2004 18:58:03 +0000 Subject: (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. --- network_gui.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'network_gui.c') 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; -- cgit v1.2.3-54-g00ecf