diff options
author | Stijn Buys <ingar@osirion.org> | 2011-02-16 12:59:52 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-02-16 12:59:52 +0000 |
commit | e082e5055ec81fcec9e38e41baae488f59aabbfb (patch) | |
tree | 1cbc83052c0c18069ef348060421fcc1e7c9f637 /src/core | |
parent | 3331f3f8babe92f8b2a1e9c2590f78d2b0d6ad4d (diff) |
Print player name and id to the console when a network client connects.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gameserver.cc | 7 | ||||
-rw-r--r-- | src/core/netserver.cc | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/core/gameserver.cc b/src/core/gameserver.cc index d6f9029..564622f 100644 --- a/src/core/gameserver.cc +++ b/src/core/gameserver.cc @@ -467,13 +467,6 @@ void GameServer::player_connect(Player *player) player->player_id = server_maxplayerid++; - /* - std::string message("^B"); - message.append(player->name()); - message.append("^B connects."); - broadcast(message, player); - */ - // notify the game module server_module->player_connect(player); diff --git a/src/core/netserver.cc b/src/core/netserver.cc index f58f2d4..0bd6350 100644 --- a/src/core/netserver.cc +++ b/src/core/netserver.cc @@ -715,6 +715,8 @@ void NetServer::parse_incoming_message(NetClient *client, const std::string & me if (client->state() == NetClient::Pending) { client->client_state = NetClient::Connected; server()->player_connect(client->player()); + + con_print << client->host() << ":" << client->port() << " id " << client->player()->id() << " joins as ^B" << client->player()->name() << std::endl; } else if ((client->state() == NetClient::Connected) && (client->player()->name() != oldname)) { |