Connecting wesnoth server in non-default port.
Fixes task #2954 with patch#2486
This commit is contained in:
parent
6a068c1847
commit
26b8f10480
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue