gameServer/HWProtoCore.hs
changeset 1928 9bf8f4f30d6b
parent 1879 bb114339eb4e
child 1929 7e6cc8da1c58
--- a/gameServer/HWProtoCore.hs	Fri Mar 27 20:29:38 2009 +0000
+++ b/gameServer/HWProtoCore.hs	Fri Mar 27 20:36:50 2009 +0000
@@ -24,6 +24,15 @@
 		msg = if not $ null xs then head xs else ""
 
 
+handleCmd clID clients _ ["PONG"] =
+	if pingsQueue client == 0 then
+		[ProtocolError "Protocol violation"]
+	else
+		[ModifyClient (\cl -> cl{pingsQueue = pingsQueue cl - 1})]
+	where
+		client = clients IntMap.! clID
+
+
 handleCmd clID clients rooms cmd =
 	if not $ logonPassed client then
 		handleCmd_NotEntered clID clients rooms cmd