summaryrefslogtreecommitdiff
path: root/Hsbot/Core.hs
diff options
context:
space:
mode:
authorJulien Dessaux2010-04-25 16:43:01 +0200
committerJulien Dessaux2010-04-25 16:43:01 +0200
commitb6d119cf5b14fd7198552e939d8f49b15307e74e (patch)
tree1f2188a89b159d6800ff89ed3346437aebfb2782 /Hsbot/Core.hs
parentAdded an utility function to correctly answer a message we receive (aka /msg) (diff)
downloadhsbot-b6d119cf5b14fd7198552e939d8f49b15307e74e.tar.gz
hsbot-b6d119cf5b14fd7198552e939d8f49b15307e74e.tar.bz2
hsbot-b6d119cf5b14fd7198552e939d8f49b15307e74e.zip
Some refactoring + cosmetics.
Diffstat (limited to '')
-rw-r--r--Hsbot/Core.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs
index 2195525..ab2989a 100644
--- a/Hsbot/Core.hs
+++ b/Hsbot/Core.hs
@@ -5,7 +5,7 @@ module Hsbot.Core
import Control.Concurrent
import Control.Concurrent.Chan()
-import Control.Exception
+import Control.Exception(IOException, catch)
import Control.Monad.State
import Data.List()
import qualified Data.Map as M
@@ -44,10 +44,10 @@ disconnectServer = do
mapM_ unloadPlugin (M.keys $ botPlugins bot)
liftIO $ putStrLn"done."
liftIO $ putStr "Closing server communication channel... "
- liftIO $ killThread $ readerThreadId bot
+ liftIO . killThread $ readerThreadId bot
liftIO $ putStrLn "done."
- liftIO $ putStr $ "Disconnecting from " ++ name ++ "... "
- liftIO $ hClose $ botHandle bot
+ liftIO . putStr $ "Disconnecting from " ++ name ++ "... "
+ liftIO . hClose $ botHandle bot
liftIO $ putStrLn "done."
-- | Socket reading loop