The console server can now be fully used for a single game. The first player to join the game is admin, he can start the game and kick players.

However, if the admin player leaves, a new game can only be started if all players have left before (this is a bug, admin status should be passed to another player).
This commit is contained in:
lotodore
2007-08-02 20:52:13 +00:00
parent f11998c28c
commit 0da29b3874
25 changed files with 481 additions and 262 deletions
+1 -4
View File
@@ -36,9 +36,6 @@
#define RECEIVER_THREAD_TERMINATE_TIMEOUT 200
// Notifications
#define NOTIFY_GAME_START 1
#define NOTIFY_KICK_PLAYER 2
class ServerRecvState;
class SenderThread;
@@ -103,7 +100,7 @@ protected:
void CleanupSessionMap();
void InternalStartGame();
void InternalKickPlayer(const std::string playerName);
void InternalKickPlayer(unsigned uniqueId);
SessionWrapper GetSession(SOCKET sock) const;
SessionWrapper GetSessionByPlayerName(const std::string playerName) const;