--- a/gameServer/HWProtoLobbyState.hs Mon Jun 23 22:22:29 2014 +0400
+++ b/gameServer/HWProtoLobbyState.hs Mon Jun 23 23:50:08 2014 +0400
@@ -61,6 +61,7 @@
let owner = find isMaster jRoomClients
let chans = map sendChan (cl : jRoomClients)
let isBanned = host cl `elem` roomBansList jRoom
+ let hasTeamsInGame = (isJust $ gameInfo jRoom) && (or . map (\t -> teamowner t == nick cl) . teamsAtStart . fromJust $ gameInfo jRoom)
return $
if isNothing maybeRI then
[Warning $ loc "No such room"]
@@ -87,6 +88,7 @@
++ answerTeams cl jRoom
++ watchRound cl jRoom chans
++ [AnswerClients [sendChan cl] ["CHAT", "[greeting]", greeting jRoom] | greeting jRoom /= ""]
+ ++ if hasTeamsInGame then ["EM", toEngineMsg $ 'G' `B.cons` nick cl] else []
where
sendStateFlags cl clients = AnswerClients [sendChan cl] . concat . intersperse [""] . filter (not . null) . concat $