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

View File

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