Fixed several stuff.
This commit is contained in:
parent
bfc06f1ff1
commit
4c76d3d40b
10 changed files with 25 additions and 21 deletions
|
@ -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 ()
|
||||
|
|
Reference in a new issue