Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-24 00:47:13 +0000
committerStijn Buys <ingar@osirion.org>2008-07-24 00:47:13 +0000
commitaaa4ff61f7b17759c4f4ccb3ac9011dd5f8a93f5 (patch)
treefafec5ef0c99f28cfa6b5b652d98b63b7a4673de /src/core/netserver.cc
parent11c122eb1cc86ca1a40c84eb411ccd97791dc47d (diff)
primary, secondary, tertiary color rendering
Diffstat (limited to 'src/core/netserver.cc')
-rw-r--r--src/core/netserver.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/netserver.cc b/src/core/netserver.cc
index 065d695..2d59788 100644
--- a/src/core/netserver.cc
+++ b/src/core/netserver.cc
@@ -493,12 +493,20 @@ void NetServer::parse_incoming_message(NetClient *client, const std::string & me
unsigned int protover;
if (msgstream >> protover) {
if (protover != PROTOCOLVERSION) {
+ // set protocol version mismatch notification
std::stringstream netmsgstream("");
- netmsgstream << "Protocol version mismatch: ";
+ netmsgstream << "^WProtocol version mismatch: ";
netmsgstream << "client " << protover << " server " << PROTOCOLVERSION << "!\n";
con_print << client->host() << ":" << client->port() << " " << netmsgstream.str() << std::endl;
- server()->send(client->player(), netmsgstream.str());
+ send_message(client, "info", netmsgstream.str());
+
+ netmsgstream.str("disconnect\n");
+ netmsgstream.clear();
+
+ client->send(netmsgstream.str());
+ client->transmit(fd());
+ client->abort();
} else {
client_initialize(client);
}
@@ -506,7 +514,7 @@ void NetServer::parse_incoming_message(NetClient *client, const std::string & me
std::string message("Unknown client protocol version!");
con_print << client->host() << ":" << client->port() << " " << message << std::endl;
server()->send(client->player(), message);
- client->abort();
+
}
return;
}