Connecting wesnoth server in non-default port.

Fixes task #2954 with patch#2486
This commit is contained in:
uid69097 2004-01-17 12:37:57 +00:00
parent 6a068c1847
commit 26b8f10480

View file

@ -168,7 +168,14 @@ void play_multiplayer_client(display& disp, game_data& units_data, config& cfg,
network::connection sock;
sock = network::connect(host);
int pos = host.find_first_of(":");
if(pos == -1) {
sock = network::connect(host);
} else {
sock = network::connect(host.substr(0,pos),atoi(host.substr(pos+1).c_str()));
}
config sides, data;