cosmetic
This commit is contained in:
parent
3b914c1b77
commit
d933088dcb
1 changed files with 1 additions and 2 deletions
|
@ -40,8 +40,7 @@ setGlobalQuitMVar status = do
|
||||||
hasAccess :: Maybe IRC.Prefix -> AccessRight -> Env IO Bool
|
hasAccess :: Maybe IRC.Prefix -> AccessRight -> Env IO Bool
|
||||||
hasAccess Nothing _ = return False
|
hasAccess Nothing _ = return False
|
||||||
hasAccess (Just mask) right = do
|
hasAccess (Just mask) right = do
|
||||||
botMVar <- asks envBotState
|
asks envBotState >>= liftIO . readMVar >>= evalStateT (fmap (any accessMatch) (gets botAccess))
|
||||||
liftIO (readMVar botMVar) >>= evalStateT (fmap (any accessMatch) (gets botAccess))
|
|
||||||
where
|
where
|
||||||
accessMatch :: AccessList -> Bool
|
accessMatch :: AccessList -> Bool
|
||||||
accessMatch (AccessList amask arights)
|
accessMatch (AccessList amask arights)
|
||||||
|
|
Reference in a new issue