From 416460886da9f8d835200ca46c9062a4ebd78fe7 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 4 Feb 2010 23:34:15 +0100 Subject: Continue rewriting, found a problem in the way I kill plugins. --- Hsbot/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Hsbot/Main.hs') 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 () -- cgit v1.2.3