summaryrefslogtreecommitdiff
path: root/Hsbot/IRC.hs
diff options
context:
space:
mode:
authorJulien Dessaux2010-04-21 20:57:22 +0200
committerJulien Dessaux2010-04-21 20:57:22 +0200
commit4c76d3d40bbfea365283c13256b3e7cf2d2deb5e (patch)
treeb5f4e70d225ba0247ad0691e37b45b8cb4142f6c /Hsbot/IRC.hs
parentFixed the clean killing of plugin's threads, fixed exception management and c... (diff)
downloadhsbot-4c76d3d40bbfea365283c13256b3e7cf2d2deb5e.tar.gz
hsbot-4c76d3d40bbfea365283c13256b3e7cf2d2deb5e.tar.bz2
hsbot-4c76d3d40bbfea365283c13256b3e7cf2d2deb5e.zip
Fixed several stuff.
Diffstat (limited to '')
-rw-r--r--Hsbot/IRC.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Hsbot/IRC.hs b/Hsbot/IRC.hs
index c837a4f..1eac2d8 100644
--- a/Hsbot/IRC.hs
+++ b/Hsbot/IRC.hs
@@ -23,7 +23,7 @@ initServer = do
-- | Run a server
runServer :: IrcBot ()
-runServer = do
+runServer = forever $ do
chan <- gets botChannel
let input = readChan chan
msg <- liftIO input
@@ -31,7 +31,6 @@ runServer = do
InputMsg inputMsg -> dispatchMessage $ InputMsg inputMsg
OutputMsg outputMsg -> sendstr (serializeIrcMsg outputMsg)
InternalCmd internalCmd -> processInternalCommand $ InternalCmd internalCmd
- runServer
-- | Joins a chan
joinChan :: String -> IrcBot ()