summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2011-05-05 00:36:05 +0200
committerJulien Dessaux2011-05-05 00:36:05 +0200
commit4522289d55dd66b6e314f18858b0a59df101300c (patch)
tree7ed5816ba38d26822cf541ffb7565ceb12051fd5
parentAdded the Duck module (PAN!). (diff)
downloadhsbot-4522289d55dd66b6e314f18858b0a59df101300c.tar.gz
hsbot-4522289d55dd66b6e314f18858b0a59df101300c.tar.bz2
hsbot-4522289d55dd66b6e314f18858b0a59df101300c.zip
Code cleaning.
-rw-r--r--Hsbot/Core.hs8
-rw-r--r--Hsbot/Plugin.hs2
-rw-r--r--TODO10
3 files changed, 14 insertions, 6 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs
index 4e79c76..9c72771 100644
--- a/Hsbot/Core.hs
+++ b/Hsbot/Core.hs
@@ -75,10 +75,10 @@ runHsbot = do
-- Then we join channels
mapM_ (liftIO . sendStr connhdl tlsCtx . IRC.encode . IRC.joinChan) channels
-- Finally we set the new bot state
- asks envBotState >>= liftIO . (flip putMVar BotState { botPlugins = M.empty
- , botHooks = []
- , botChannels = channels
- , botNickname = nickname })
+ asks envBotState >>= liftIO . flip putMVar BotState { botPlugins = M.empty
+ , botHooks = []
+ , botChannels = channels
+ , botNickname = nickname }
-- | Run the bot itself
trueRunHsbot :: Env IO BotStatus
trueRunHsbot = do
diff --git a/Hsbot/Plugin.hs b/Hsbot/Plugin.hs
index 6f14413..ebcff8d 100644
--- a/Hsbot/Plugin.hs
+++ b/Hsbot/Plugin.hs
@@ -13,7 +13,7 @@ import Hsbot.Types
loadPlugin :: PluginId -> Env IO ()
loadPlugin pId = do
botMVar <- asks envBotState
- (liftIO $ takeMVar botMVar) >>= execStateT effectivelyLoadPlugin >>= liftIO . putMVar botMVar
+ liftIO (takeMVar botMVar) >>= execStateT effectivelyLoadPlugin >>= liftIO . putMVar botMVar
where
effectivelyLoadPlugin :: Bot (Env IO) ()
effectivelyLoadPlugin = do
diff --git a/TODO b/TODO
index 8e03000..07ac952 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,16 @@
+* owner rights
+* better hooks?
+
+
+
+
+
+
+
:julien!~julien@ogu21.corp PRIVMSG #shbot :@quote graou snif
* Improve configuration file errors display
* fork process in background
-* implement logging capabilities
* add a function to answer by /msg to somebody
* write the vote system for the quote module