--- a/gameServer/HWProtoLobbyState.hs Thu Apr 04 14:37:19 2013 +0200
+++ b/gameServer/HWProtoLobbyState.hs Tue Jun 04 22:28:12 2013 +0200
@@ -92,12 +92,9 @@
, AnswerClients [sendChan cl] $ ["CLIENT_FLAGS", "+h", ownerNick]
]
++ (if clientProto cl < 38 then map (readynessMessage cl) jRoomClients else [sendStateFlags cl jRoomClients])
- ++ [AnswerClients [sendChan cl] ["PING"]
- , ModifyClient $ \c -> c{actionsPending = actionsPending cl
- ++ answerFullConfig cl (mapParams jRoom) (params jRoom)
- ++ answerTeams cl jRoom
- ++ watchRound cl jRoom chans}
- ]
+ ++ answerFullConfig cl (mapParams jRoom) (params jRoom)
+ ++ answerTeams cl jRoom
+ ++ watchRound cl jRoom chans
where
readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
@@ -147,6 +144,11 @@
else
liftM ((:) (AnswerClients [clChan] ["JOINING", roomName])) $ handleCmd_lobby ["JOIN_ROOM", roomName]
+
+handleCmd_lobby ("RND":rs) = do
+ c <- liftM sendChan thisClient
+ return [Random [c] rs]
+
---------------------------
-- Administrator's stuff --