Keep lobby open in the background during internet games. Show the lobby after the game finished. Re-open the game. Start and stop irc thread together with the client thread.

This commit is contained in:
lotodore
2007-10-08 20:14:44 +00:00
parent dc8f9e0c73
commit 310fadefdb
9 changed files with 77 additions and 59 deletions
+5 -2
View File
@@ -40,6 +40,8 @@ public:
~Session();
enum GameType { GAME_TYPE_NONE, GAME_TYPE_LOCAL, GAME_TYPE_NETWORK, GAME_TYPE_INTERNET };
bool init();
void startLocalGame(const GameData &gameData, const StartData &startData);
@@ -49,6 +51,8 @@ public:
GuiInterface *getGui();
GameType GetGameType();
void startInternetClient();
void startNetworkClient(const std::string &serverAddress, unsigned serverPort, bool ipv6, bool sctp, const std::string &pwd);
void startNetworkClientForLocalServer(const GameData &gameData);
@@ -62,9 +66,7 @@ public:
void terminateNetworkServer();
bool waitForNetworkServer(unsigned timeoutMsec);
void startIrcClient();
void sendIrcChatMessage(const std::string &message);
void terminateIrcClient();
void sendClientPlayerAction();
@@ -92,6 +94,7 @@ private:
boost::shared_ptr<Game> currentGame;
GuiInterface *myGui;
ConfigFile *myConfig;
GameType myGameType;
};