gameServer/HWProtoCore.hs
changeset 1929 7e6cc8da1c58
parent 1928 9bf8f4f30d6b
child 2126 cb249fa8e3da
equal deleted inserted replaced
1928:9bf8f4f30d6b 1929:7e6cc8da1c58
    14 handleCmd, handleCmd_loggedin :: CmdHandler
    14 handleCmd, handleCmd_loggedin :: CmdHandler
    15 
    15 
    16 handleCmd clID _ _ ["PING"] = [AnswerThisClient ["PONG"]]
    16 handleCmd clID _ _ ["PING"] = [AnswerThisClient ["PONG"]]
    17 
    17 
    18 handleCmd clID clients rooms ("QUIT" : xs) =
    18 handleCmd clID clients rooms ("QUIT" : xs) =
    19 	(if isMaster client then [RemoveRoom] else [RemoveClientTeams clID])
    19 	[ByeClient msg]
    20 	++ [ByeClient msg]
       
    21 	where
    20 	where
    22 		client = clients IntMap.! clID
       
    23 		clientNick = nick client
       
    24 		msg = if not $ null xs then head xs else ""
    21 		msg = if not $ null xs then head xs else ""
    25 
    22 
    26 
    23 
    27 handleCmd clID clients _ ["PONG"] =
    24 handleCmd clID clients _ ["PONG"] =
    28 	if pingsQueue client == 0 then
    25 	if pingsQueue client == 0 then