gameServer/HWProtoCore.hs
changeset 13673 1aa5e884326a
parent 13510 60bcc20e6ab0
child 13692 70c8feb81d35
equal deleted inserted replaced
13671:7a31a292fa84 13673:1aa5e884326a
    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 "User quit: " `B.append` (head xs) else loc "bye"
    43         -- "User quit: " is a special string parsed by frontend, do not localize.
       
    44         -- It denotes when the /quit command has been used with message parameter.
       
    45         -- "bye" is also a special string.
       
    46         msg = if not $ null xs then "User quit: " `B.append` (head xs) else "bye"
    44 
    47 
    45 
    48 
    46 handleCmd ["PONG"] = do
    49 handleCmd ["PONG"] = do
    47     cl <- thisClient
    50     cl <- thisClient
    48     if pingsQueue cl == 0 then
    51     if pingsQueue cl == 0 then