--- a/netserver/HWProto.hs Fri Jan 02 19:44:52 2009 +0000
+++ b/netserver/HWProto.hs Fri Jan 02 19:49:04 2009 +0000
@@ -21,6 +21,7 @@
answerClientOnly = makeAnswer clientOnly
answerOthersRoom = makeAnswer othersInRoom
answerSameRoom = makeAnswer sameRoom
+answerAll = makeAnswer allClients
answerBadCmd = answerClientOnly ["ERROR", "Bad command, state or incorrect parameter"]
answerNotMaster = answerClientOnly ["ERROR", "You cannot configure room parameters"]
@@ -60,9 +61,9 @@
answerOthersRoom ["LEFT", nick]
answerQuitLobby nick msg =
if not $ null msg then
- answerOthersRoom ["LOBBY:LEFT", nick, msg]
+ answerAll ["LOBBY:LEFT", nick, msg]
else
- answerOthersRoom ["LOBBY:LEFT", nick]
+ answerAll ["LOBBY:LEFT", nick]
answerJoined nick = answerSameRoom ["JOINED", nick]
answerRunGame = answerSameRoom ["RUN_GAME"]
@@ -101,7 +102,6 @@
answerPing = makeAnswer allClients ["PING"]
-
-- Main state-independent cmd handler
handleCmd :: CmdHandler
handleCmd client _ rooms ("QUIT" : xs) =