Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-02-16 12:59:52 +0000
committerStijn Buys <ingar@osirion.org>2011-02-16 12:59:52 +0000
commite082e5055ec81fcec9e38e41baae488f59aabbfb (patch)
tree1cbc83052c0c18069ef348060421fcc1e7c9f637 /src/core
parent3331f3f8babe92f8b2a1e9c2590f78d2b0d6ad4d (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.cc7
-rw-r--r--src/core/netserver.cc2
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)) {