gameServer/HWProtoCore.hs
changeset 11974 1d07f4ceb8c6
parent 11575 db7743e2fad1
child 13508 da59012fbd7a
equal deleted inserted replaced
11973:de1b616fd5e6 11974:1d07f4ceb8c6
    38 handleCmd ["PING"] = answerClient ["PONG"]
    38 handleCmd ["PING"] = answerClient ["PONG"]
    39 
    39 
    40 
    40 
    41 handleCmd ("QUIT" : xs) = return [ByeClient msg]
    41 handleCmd ("QUIT" : xs) = return [ByeClient msg]
    42     where
    42     where
    43         msg = if not $ null xs then head xs else loc "bye"
    43         msg = if not $ null xs then "User quit: " `B.append` (head xs) else loc "bye"
    44 
    44 
    45 
    45 
    46 handleCmd ["PONG"] = do
    46 handleCmd ["PONG"] = do
    47     cl <- thisClient
    47     cl <- thisClient
    48     if pingsQueue cl == 0 then
    48     if pingsQueue cl == 0 then