equal
deleted
inserted
replaced
240 , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+h", nick newMaster] |
240 , AnswerClients thisRoomChans ["CLIENT_FLAGS", "+h", nick newMaster] |
241 ] |
241 ] |
242 |
242 |
243 newRoom' <- io $ room'sM rnc id ri |
243 newRoom' <- io $ room'sM rnc id ri |
244 chans <- liftM (map sendChan) $! sameProtoClientsS proto |
244 chans <- liftM (map sendChan) $! sameProtoClientsS proto |
245 processAction $ AnswerClients chans ("ROOM" : "UPD" : oldRoomName : roomInfo (nick newMaster) newRoom') |
245 processAction $ AnswerClients chans ("ROOM" : "UPD" : oldRoomName : roomInfo proto(nick newMaster) newRoom') |
246 |
246 |
247 |
247 |
248 processAction (AddRoom roomName roomPassword) = do |
248 processAction (AddRoom roomName roomPassword) = do |
249 Just clId <- gets clientIndex |
249 Just clId <- gets clientIndex |
250 rnc <- gets roomsClients |
250 rnc <- gets roomsClients |
263 processAction $ MoveToRoom rId |
263 processAction $ MoveToRoom rId |
264 |
264 |
265 chans <- liftM (map sendChan) $! sameProtoClientsS proto |
265 chans <- liftM (map sendChan) $! sameProtoClientsS proto |
266 |
266 |
267 mapM_ processAction [ |
267 mapM_ processAction [ |
268 AnswerClients chans ("ROOM" : "ADD" : roomInfo n rm{playersIn = 1}) |
268 AnswerClients chans ("ROOM" : "ADD" : roomInfo proto n rm{playersIn = 1}) |
269 ] |
269 ] |
270 |
270 |
271 |
271 |
272 processAction RemoveRoom = do |
272 processAction RemoveRoom = do |
273 Just clId <- gets clientIndex |
273 Just clId <- gets clientIndex |
292 rnc <- gets roomsClients |
292 rnc <- gets roomsClients |
293 ri <- io $ clientRoomM rnc clId |
293 ri <- io $ clientRoomM rnc clId |
294 rm <- io $ room'sM rnc id ri |
294 rm <- io $ room'sM rnc id ri |
295 n <- io $ client'sM rnc nick (masterID rm) |
295 n <- io $ client'sM rnc nick (masterID rm) |
296 chans <- liftM (map sendChan) $! sameProtoClientsS proto |
296 chans <- liftM (map sendChan) $! sameProtoClientsS proto |
297 processAction $ AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo n rm) |
297 processAction $ AnswerClients chans ("ROOM" : "UPD" : name rm : roomInfo proto n rm) |
298 |
298 |
299 |
299 |
300 processAction UnreadyRoomClients = do |
300 processAction UnreadyRoomClients = do |
301 ri <- clientRoomA |
301 ri <- clientRoomA |
302 roomPlayers <- roomClientsS ri |
302 roomPlayers <- roomClientsS ri |