equal
deleted
inserted
replaced
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 |