diff options
author | Ole Daniel Evensen <ole_daniel_evensen@hotmail.com> | 2010-12-06 19:30:28 +0100 |
---|---|---|
committer | Ole Daniel Evensen <ole_daniel_evensen@hotmail.com> | 2010-12-06 19:30:28 +0100 |
commit | b140aca7ab3ce6d312bc147a82dcf016af72eafd (patch) | |
tree | fc5437344c4e6a02b102d6290bb1a43c70d5d575 /server/lobby.cpp | |
parent | aead77e8995cba92515c10944ff6e37d68916575 (diff) |
some preliminary code and structure for dis-connection and re-connection.
Diffstat (limited to 'server/lobby.cpp')
-rw-r--r-- | server/lobby.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/server/lobby.cpp b/server/lobby.cpp index 620b2fd..7939977 100644 --- a/server/lobby.cpp +++ b/server/lobby.cpp @@ -17,12 +17,17 @@ void Lobby::handle_connect(Connection::p connection) { void Lobby::handle_login(Client::p client) { std::cout << "Client " << client->nick() << " entered the lobby." << std::endl; - std::vector<std::string> game_modes; - - game_modes.push_back("1p test mode"); - game_modes.push_back("4p test mode"); - - client->lobby_status(game_modes, boost::bind(&Lobby::handle_action, this, client, _1)); + if(0) {//client->id != 0 + //We check if player is in an ongoing game? + + } else { + std::vector<std::string> game_modes; + + game_modes.push_back("1p test mode"); + game_modes.push_back("4p test mode"); + + client->lobby_status(game_modes, boost::bind(&Lobby::handle_action, this, client, _1)); + } } void Lobby::handle_action(Client::p client, int game_mode) { |