gameServer/HWProtoLobbyState.hs
changeset 1813 cfe1481e0247
parent 1811 1b9e33623b7e
child 1815 3d62cf9c350e
--- a/gameServer/HWProtoLobbyState.hs	Fri Feb 20 14:12:16 2009 +0000
+++ b/gameServer/HWProtoLobbyState.hs	Fri Feb 20 19:40:55 2009 +0000
@@ -3,6 +3,7 @@
 import qualified Data.Map as Map
 import qualified Data.IntMap as IntMap
 import qualified Data.IntSet as IntSet
+import qualified Data.Foldable as Foldable
 import Maybe
 import Data.List
 --------------------------------------
@@ -68,7 +69,7 @@
 		++ [AnswerThisRoom ["NOT_READY", nick client]]
 		++ answerFullConfig jRoom
 		++ answerTeams
---		++ watchRound)
+		++ watchRound
 	where
 		noSuchRoom = isNothing mbRoom
 		mbRoom = find (\r -> roomName == name r && roomProto r == clientProto client) $ IntMap.elems rooms 
@@ -86,12 +87,13 @@
 
 		toAnswer (paramName, paramStrs) = AnswerThisClient $ "CFG" : paramName : paramStrs
 		answerFullConfig room = map toAnswer (Map.toList $ params room)
-{-
-		watchRound = if (roomProto clRoom < 20) || (not $ gameinprogress clRoom) then
+
+		watchRound = if not $ gameinprogress jRoom then
 					[]
 				else
-					(answerClientOnly  ["RUN_GAME"]) ++
-					answerClientOnly ("GAMEMSG" : toEngineMsg "e$spectate 1" : (toList $ roundMsgs clRoom)) -}
+					[AnswerThisClient  ["RUN_GAME"],
+					AnswerThisClient $ "GAMEMSG" : toEngineMsg "e$spectate 1" : (Foldable.toList $ roundMsgs jRoom)]
+
 		answerTeams = if gameinprogress jRoom then
 				answerAllTeams (teamsAtStart jRoom)
 			else