equal
deleted
inserted
replaced
66 act (VoteMap roomSave) = do |
66 act (VoteMap roomSave) = do |
67 rm <- thisRoom |
67 rm <- thisRoom |
68 let rs = Map.lookup roomSave (roomSaves rm) |
68 let rs = Map.lookup roomSave (roomSaves rm) |
69 case rs of |
69 case rs of |
70 Nothing -> return [] |
70 Nothing -> return [] |
71 Just (mp, p) -> return [ModifyRoom $ \r -> r{params = p, mapParams = mp}] |
71 Just (mp, p) -> do |
|
72 cl <- thisClient |
|
73 chans <- roomClientsChans |
|
74 let a = map (replaceChans chans) $ answerFullConfigParams cl mp p |
|
75 return $ |
|
76 (ModifyRoom $ \r -> r{params = p, mapParams = mp}) |
|
77 : SendUpdateOnThisRoom |
|
78 : a |
|
79 where |
|
80 replaceChans chans (AnswerClients _ msg) = AnswerClients chans msg |
|
81 replaceChans _ a = a |
72 |
82 |
73 |
83 |
74 startVote :: VoteType -> Reader (ClientIndex, IRnC) [Action] |
84 startVote :: VoteType -> Reader (ClientIndex, IRnC) [Action] |
75 startVote vt = do |
85 startVote vt = do |
76 (ci, rnc) <- ask |
86 (ci, rnc) <- ask |