Archived
1
0
Fork 0

Fixed several stuff.

This commit is contained in:
Julien Dessaux 2010-04-21 20:57:22 +02:00
parent bfc06f1ff1
commit 4c76d3d40b
10 changed files with 25 additions and 21 deletions

View file

@ -5,7 +5,7 @@ module Hsbot.Main
import Control.Exception
import Control.Monad.State
import Prelude hiding (catch)
import System.IO
import System.IO()
import Config
import Hsbot.Core
@ -17,8 +17,8 @@ import Hsbot.Types
imain :: IO ()
imain = do
bot <- connectServer $ ircServer config
(execStateT run bot) `catch` (\(ex :: IOException) -> return bot)
evalStateT disconnectServer bot
bot' <- (execStateT run bot) `catch` (\(_ :: IOException) -> return bot)
evalStateT disconnectServer bot'
-- | The Bot monad main function
run :: IrcBot ()