gameServer/HWProtoCore.hs
changeset 1928 9bf8f4f30d6b
parent 1879 bb114339eb4e
child 1929 7e6cc8da1c58
equal deleted inserted replaced
1927:e2031906a347 1928:9bf8f4f30d6b
    20 	++ [ByeClient msg]
    20 	++ [ByeClient msg]
    21 	where
    21 	where
    22 		client = clients IntMap.! clID
    22 		client = clients IntMap.! clID
    23 		clientNick = nick client
    23 		clientNick = nick client
    24 		msg = if not $ null xs then head xs else ""
    24 		msg = if not $ null xs then head xs else ""
       
    25 
       
    26 
       
    27 handleCmd clID clients _ ["PONG"] =
       
    28 	if pingsQueue client == 0 then
       
    29 		[ProtocolError "Protocol violation"]
       
    30 	else
       
    31 		[ModifyClient (\cl -> cl{pingsQueue = pingsQueue cl - 1})]
       
    32 	where
       
    33 		client = clients IntMap.! clID
    25 
    34 
    26 
    35 
    27 handleCmd clID clients rooms cmd =
    36 handleCmd clID clients rooms cmd =
    28 	if not $ logonPassed client then
    37 	if not $ logonPassed client then
    29 		handleCmd_NotEntered clID clients rooms cmd
    38 		handleCmd_NotEntered clID clients rooms cmd