diff options
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r-- | src/core/netconnection.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index c37fe05..39a25a3 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -436,6 +436,8 @@ void NetConnection::send_info_request(Info *info) * frame * sup <id> * pif <id> + * pid <id> + * inf <id> * zone */ void NetConnection::parse_incoming_message(const std::string & message) @@ -684,29 +686,27 @@ void NetConnection::parse_incoming_message(const std::string & message) return; } } + } else if (command == "inf") { // incoming info record - std::string label; - char c; - - while ((msgstream.get(c)) && (c != '"')); - while ((msgstream.get(c)) && (c != '"')) - label += c; - - if (label.size()) { - Info *info = Info::find(label); + unsigned int id; + if (msgstream >> id) { + + Info *info = Info::find(id); if (!info) { - info = new Info(label); - Info::add(info); + info = new Info(id); } info->receive_server_update(msgstream); info->clear_timestamp(); + } else { con_warn << "Received empty information record!" << std::endl; } + } else if (command == "sup") { + if (connection_state == Connected) { unsigned int id; if (msgstream >> id) { |