1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 03:15:32 +00:00

[Browser] Do not allow to connect to unreachable servers

This commit is contained in:
Koncord 2017-05-26 03:10:53 +08:00
parent f8c6ed8028
commit 4082cddde5

View file

@ -36,7 +36,9 @@ void ServerInfoDialog::refresh()
{
leAddr->setText(sd.first.ToString(true, ':'));
lblName->setText(sd.second.GetName());
lblPing->setNum((int) PingRakNetServer(sd.first.ToString(false), sd.first.GetPort()));
int ping = PingRakNetServer(sd.first.ToString(false), sd.first.GetPort());
lblPing->setNum(ping);
btnConnect->setDisabled(ping == PING_UNREACHABLE);
listPlayers->clear();