--- 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