summaryrefslogtreecommitdiff
path: root/Hsbot/Main.hs
diff options
context:
space:
mode:
authorJulien Dessaux2010-02-04 23:34:15 +0100
committerJulien Dessaux2010-02-04 23:34:15 +0100
commit416460886da9f8d835200ca46c9062a4ebd78fe7 (patch)
treef76663fd592d13031f494674c8c602e624f1d03d /Hsbot/Main.hs
parentBegan a complete rewrite of command and plugin management. (diff)
downloadhsbot-416460886da9f8d835200ca46c9062a4ebd78fe7.tar.gz
hsbot-416460886da9f8d835200ca46c9062a4ebd78fe7.tar.bz2
hsbot-416460886da9f8d835200ca46c9062a4ebd78fe7.zip
Continue rewriting, found a problem in the way I kill plugins.
Diffstat (limited to '')
-rw-r--r--Hsbot/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Hsbot/Main.hs b/Hsbot/Main.hs
index c73a2e5..ea1bf16 100644
--- a/Hsbot/Main.hs
+++ b/Hsbot/Main.hs
@@ -15,8 +15,8 @@ import Hsbot.Types
imain :: IO ()
imain = do
bot <- connectServer $ ircServer config
- (runStateT run bot) `catch` (const $ return ((), bot))
- disconnectServer bot
+ bot' <- (execStateT run bot) `catch` (const $ return bot)
+ evalStateT disconnectServer bot'
-- | The Bot monad main function
run :: IrcBot ()