From e082e5055ec81fcec9e38e41baae488f59aabbfb Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 16 Feb 2011 12:59:52 +0000 Subject: Print player name and id to the console when a network client connects. --- src/core/gameserver.cc | 7 ------- src/core/netserver.cc | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/core') 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)) { -- cgit v1.2.3