You see an error message now if you cannot connect to a server and irc is not quitted.

This commit is contained in:
Titus Tscharntke 2011-01-02 18:47:43 +00:00
parent 8a421ba639
commit 472aa69c5c
1 changed files with 6 additions and 6 deletions

View File

@ -434,14 +434,14 @@ void MenuStateMasterserver::mouseClick(int x, int y, MouseButton mouseButton){
soundRenderer.playFx(coreData.getClickSoundB());
string connectServerIP = serverLines[i]->getMasterServerInfo()->getIpAddress();
int connectServerPort = serverLines[i]->getMasterServerInfo()->getExternalConnectPort();
connectToServer(connectServerIP,connectServerPort);
bool connected=connectToServer(connectServerIP,connectServerPort);
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
safeMutex.ReleaseLock();
cleanup();
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
mainMenu->setState(new MenuStateConnectedGame(program, mainMenu,jmMasterserver));
if(connected){
cleanup();
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
mainMenu->setState(new MenuStateConnectedGame(program, mainMenu,jmMasterserver));
}
break;
}
}