Fix lobby selector
authorunc0rr
Fri, 02 Jan 2009 19:49:04 +0000
changeset 1567 95d7aab0df3f
parent 1566 6b63c75fdc68
child 1568 15a446307993
Fix lobby selector
netserver/HWProto.hs
--- 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) =