Client sends PONG to server's PING
authorunc0rr
Sun, 02 Nov 2008 20:48:10 +0000
changeset 1462 d3323637da1f
parent 1461 87e5a6c3882c
child 1463 659157f76171
Client sends PONG to server's PING
QTfrontend/newnetclient.cpp
netserver/HWProto.hs
--- a/QTfrontend/newnetclient.cpp	Sun Nov 02 20:41:02 2008 +0000
+++ b/QTfrontend/newnetclient.cpp	Sun Nov 02 20:48:10 2008 +0000
@@ -225,6 +225,11 @@
 		return;
 	}
 
+	if (lst[0] == "PING") {
+		RawSendNet(QString("PONG"));
+		return;
+	}
+
 	if (lst[0] == "ROOMS") {
 		QStringList tmp = lst;
 		tmp.removeFirst();
--- a/netserver/HWProto.hs	Sun Nov 02 20:41:02 2008 +0000
+++ b/netserver/HWProto.hs	Sun Nov 02 20:48:10 2008 +0000
@@ -82,6 +82,9 @@
 handleCmd _ _ _ ["PING"] = -- core requsted
 	(noChangeClients, noChangeRooms, answerPing)
 
+handleCmd _ _ _ ["PONG"] =
+	(noChangeClients, noChangeRooms, [])
+
 -- check state and call state-dependent commmand handlers
 handleCmd client clients rooms cmd =
 	if null (nick client) || protocol client == 0 then