equal
deleted
inserted
replaced
172 modifyRoom rnc (\r -> r{playersIn = playersIn r + 1}) ri |
172 modifyRoom rnc (\r -> r{playersIn = playersIn r + 1}) ri |
173 moveClientToRoom rnc ri ci |
173 moveClientToRoom rnc ri ci |
174 |
174 |
175 chans <- liftM (map sendChan) $ roomClientsS ri |
175 chans <- liftM (map sendChan) $ roomClientsS ri |
176 clNick <- client's nick |
176 clNick <- client's nick |
177 |
177 allClientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS |
178 processAction $ AnswerClients chans ["JOINED", clNick] |
178 |
|
179 mapM_ processAction [ |
|
180 AnswerClients chans ["JOINED", clNick] |
|
181 , AnswerClients allClientsChans ["CLIENT_FLAGS", "+i", clNick] |
|
182 ] |
179 |
183 |
180 |
184 |
181 processAction (MoveToLobby msg) = do |
185 processAction (MoveToLobby msg) = do |
182 (Just ci) <- gets clientIndex |
186 (Just ci) <- gets clientIndex |
183 ri <- clientRoomA |
187 ri <- clientRoomA |
193 mapM_ processAction [ChangeMaster Nothing, NoticeMessage AdminLeft, RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] |
197 mapM_ processAction [ChangeMaster Nothing, NoticeMessage AdminLeft, RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] |
194 else |
198 else |
195 processAction RemoveRoom |
199 processAction RemoveRoom |
196 else |
200 else |
197 mapM_ processAction [RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] |
201 mapM_ processAction [RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]] |
|
202 |
|
203 allClientsChans <- liftM (Prelude.map sendChan . Prelude.filter isVisible) $! allClientsS |
|
204 processAction $ AnswerClients allClientsChans ["CLIENT_FLAGS", "-i", clNick] |
198 |
205 |
199 -- when not removing room |
206 -- when not removing room |
200 ready <- client's isReady |
207 ready <- client's isReady |
201 when (not master || playersNum > 1) . io $ do |
208 when (not master || playersNum > 1) . io $ do |
202 modifyRoom rnc (\r -> r{ |
209 modifyRoom rnc (\r -> r{ |