gameServer/HandlerUtils.hs
changeset 4932 f11d80bac7ed
parent 4614 26661bf28dd5
child 4975 31da8979e5b1
--- 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