diff options
Diffstat (limited to '')
-rw-r--r-- | Hsbot/Utils.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Hsbot/Utils.hs b/Hsbot/Utils.hs index 043037d..2ea1a49 100644 --- a/Hsbot/Utils.hs +++ b/Hsbot/Utils.hs @@ -40,8 +40,7 @@ setGlobalQuitMVar status = do hasAccess :: Maybe IRC.Prefix -> AccessRight -> Env IO Bool hasAccess Nothing _ = return False hasAccess (Just mask) right = do - botMVar <- asks envBotState - liftIO (readMVar botMVar) >>= evalStateT (fmap (any accessMatch) (gets botAccess)) + asks envBotState >>= liftIO . readMVar >>= evalStateT (fmap (any accessMatch) (gets botAccess)) where accessMatch :: AccessList -> Bool accessMatch (AccessList amask arights) |