summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2011-08-08 21:11:01 +0200
committerJulien Dessaux2011-08-08 21:11:01 +0200
commitd933088dcb7d9b7ed05e0fbeb478472e0dae5a7a (patch)
treed2742dff69fba025cfe0c1e09ad7dacce59aa44c
parentAdded exception handling, an autorestart when that happens and output in case... (diff)
downloadhsbot-d933088dcb7d9b7ed05e0fbeb478472e0dae5a7a.tar.gz
hsbot-d933088dcb7d9b7ed05e0fbeb478472e0dae5a7a.tar.bz2
hsbot-d933088dcb7d9b7ed05e0fbeb478472e0dae5a7a.zip
cosmetic
-rw-r--r--Hsbot/Utils.hs3
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)