equal
deleted
inserted
replaced
64 clientByNick n = do |
64 clientByNick n = do |
65 (_, rnc) <- ask |
65 (_, rnc) <- ask |
66 let allClientIDs = allClients rnc |
66 let allClientIDs = allClients rnc |
67 return $ find (\clId -> let cl = client rnc clId in n == nick cl && not (isChecker cl)) allClientIDs |
67 return $ find (\clId -> let cl = client rnc clId in n == nick cl && not (isChecker cl)) allClientIDs |
68 |
68 |
|
69 |
|
70 roomAdminOnly :: Reader (ClientIndex, IRnC) [Action] -> Reader (ClientIndex, IRnC) [Action] |
|
71 roomAdminOnly h = thisClient >>= \cl -> if isMaster cl then h else return [] |
|
72 |
|
73 |
|
74 serverAdminOnly :: Reader (ClientIndex, IRnC) [Action] -> Reader (ClientIndex, IRnC) [Action] |
|
75 serverAdminOnly h = thisClient >>= \cl -> if isAdministrator cl then h else return [] |