equal
deleted
inserted
replaced
113 answerTeams cl jRoom = let f = if isJust $ gameInfo jRoom then teamsAtStart . fromJust . gameInfo else teams in answerAllTeams cl $ f jRoom |
113 answerTeams cl jRoom = let f = if isJust $ gameInfo jRoom then teamsAtStart . fromJust . gameInfo else teams in answerAllTeams cl $ f jRoom |
114 |
114 |
115 watchRound cl jRoom chans = if isNothing $ gameInfo jRoom then |
115 watchRound cl jRoom chans = if isNothing $ gameInfo jRoom then |
116 [] |
116 [] |
117 else |
117 else |
118 [AnswerClients [sendChan cl] ["RUN_GAME"] |
118 AnswerClients [sendChan cl] ["RUN_GAME"] |
119 , AnswerClients chans ["CLIENT_FLAGS", "+g", nick cl] |
119 : AnswerClients chans ["CLIENT_FLAGS", "+g", nick cl] |
120 , ModifyClient (\c -> c{isInGame = True}) |
120 : ModifyClient (\c -> c{isInGame = True}) |
121 , AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : (reverse . roundMsgs . fromJust . gameInfo $ jRoom)] |
121 : (AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : (reverse . roundMsgs . fromJust . gameInfo $ jRoom)) |
|
122 : [AnswerClients [sendChan cl] $ "EM" : [fromJust msg] | isJust msg] |
|
123 where |
|
124 msg = lastFilteredTimedMsg . fromJust . gameInfo $ jRoom |
122 |
125 |
123 |
126 |
124 handleCmd_lobby ["JOIN_ROOM", roomName] = |
127 handleCmd_lobby ["JOIN_ROOM", roomName] = |
125 handleCmd_lobby ["JOIN_ROOM", roomName, ""] |
128 handleCmd_lobby ["JOIN_ROOM", roomName, ""] |
126 |
129 |