--- a/gameServer/HandlerUtils.hs Sun Feb 06 18:59:53 2011 +0300
+++ b/gameServer/HandlerUtils.hs Sun Feb 06 21:50:29 2011 +0300
@@ -49,10 +49,10 @@
thisClientChans :: Reader (ClientIndex, IRnC) [ClientChan]
thisClientChans = do
(ci, rnc) <- ask
- return $ [sendChan (rnc `client` ci)]
+ return [sendChan (rnc `client` ci)]
answerClient :: [B.ByteString] -> Reader (ClientIndex, IRnC) [Action]
-answerClient msg = thisClientChans >>= return . (: []) . flip AnswerClients msg
+answerClient msg = liftM ((: []) . flip AnswerClients msg) thisClientChans
allRoomInfos :: Reader (a, IRnC) [RoomInfo]
allRoomInfos = liftM ((\irnc -> map (room irnc) $ allRooms irnc) . snd) ask