summaryrefslogtreecommitdiff
path: root/Hsbot/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Hsbot/Main.hs')
-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 ()