diff options
author | Stijn Buys <ingar@osirion.org> | 2010-02-21 12:36:17 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-02-21 12:36:17 +0000 |
commit | 730c452ff5896ed66114e6b2153add9379edef5c (patch) | |
tree | 353c7c0449deb41f3396d776c0437a4141383d01 /src/core/netserver.cc | |
parent | 745b4e04e5f23a02e5d9b12ebabf38d6dd034136 (diff) |
network info messages bugfixes
Diffstat (limited to 'src/core/netserver.cc')
-rw-r--r-- | src/core/netserver.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/netserver.cc b/src/core/netserver.cc index 6ba9dc7..0e44189 100644 --- a/src/core/netserver.cc +++ b/src/core/netserver.cc @@ -273,7 +273,7 @@ void NetServer::receive() NetClient * NetServer::client_connect(std::string const host, int const port) { - con_debug << "client_connect " << host << ":" << port << "\n"; + con_print << "Client " << host << ":" << port << " connected\n"; NetClient *client = new NetClient(host, port, fd()); if (client->error()) { @@ -289,7 +289,6 @@ NetClient * NetServer::client_connect(std::string const host, int const port) void NetServer::client_initialize(NetClient *client) { - // send welcome message std::string welcome("^B"); welcome.append(Cvar::sv_name->str()); @@ -764,16 +763,23 @@ void NetServer::parse_incoming_message(NetClient *client, const std::string & me return; } + //con_debug << "Received info request for " << infotype << ":" << infolabelstr << std::endl; + info = Info::find(infotype, infolabelstr); } else { + //con_debug << "Received info request for id " << id << std::endl; + // the client is requesting an information record by id info = Info::find(id); } if (info) { + //con_debug << "Sending info for " << info->id() << " " << info->type()->label() << ":" << info->label() << std::endl; + send_info_update(client, info); client->transmit(); } + return; } else if (command.compare("rcon") == 0) { if ((message.size() > command.size() + 1) && Cvar::sv_password->str().size()) { |