diff -r d7cd5b43588f -r 7025bd3c3131 gameServer/HandlerUtils.hs --- a/gameServer/HandlerUtils.hs Wed Mar 12 22:40:49 2014 -0400 +++ b/gameServer/HandlerUtils.hs Thu Mar 13 23:25:31 2014 +0400 @@ -66,3 +66,10 @@ let allClientIDs = allClients rnc return $ find (\clId -> let cl = client rnc clId in n == nick cl && not (isChecker cl)) allClientIDs + +roomAdminOnly :: Reader (ClientIndex, IRnC) [Action] -> Reader (ClientIndex, IRnC) [Action] +roomAdminOnly h = thisClient >>= \cl -> if isMaster cl then h else return [] + + +serverAdminOnly :: Reader (ClientIndex, IRnC) [Action] -> Reader (ClientIndex, IRnC) [Action] +serverAdminOnly h = thisClient >>= \cl -> if isAdministrator cl then h else return []