diff -r d04601edf73d -r 08ed346ed341 gameServer/HandlerUtils.hs --- a/gameServer/HandlerUtils.hs Thu Dec 29 09:40:16 2011 +0100 +++ b/gameServer/HandlerUtils.hs Thu Dec 29 23:02:40 2011 +0300 @@ -48,6 +48,12 @@ (ci, rnc) <- ask return [sendChan (rnc `client` ci)] +sameProtoChans :: Reader (ClientIndex, IRnC) [ClientChan] +sameProtoChans = do + (ci, rnc) <- ask + let p = clientProto (rnc `client` ci) + return . map sendChan . filter (\c -> clientProto c == p) . map (client rnc) $ allClients rnc + answerClient :: [B.ByteString] -> Reader (ClientIndex, IRnC) [Action] answerClient msg = liftM ((: []) . flip AnswerClients msg) thisClientChans