summaryrefslogtreecommitdiff
path: root/HsBot/IRC.hs
diff options
context:
space:
mode:
authorpb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157>2010-03-28 11:52:17 +0000
committerpb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157>2010-03-28 11:52:17 +0000
commited66eb310a9ec78901e6a3be2275f9de62ad5708 (patch)
treef37e37f47e0ea693200d1a0783796cb45e6bdb2c /HsBot/IRC.hs
parent3d7e9915c4fab6f91f11b3de66ac8bbcb8b3c0c7 (diff)
git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@52 9f8f72e9-4bf4-416e-b76e-7d4203597157
Diffstat (limited to 'HsBot/IRC.hs')
-rw-r--r--HsBot/IRC.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/HsBot/IRC.hs b/HsBot/IRC.hs
index cf1a1e8..da488ea 100644
--- a/HsBot/IRC.hs
+++ b/HsBot/IRC.hs
@@ -60,7 +60,7 @@ ircStart (DispatchEnv state conf dispatch) = do
hSetBuffering h NoBuffering
ircWrite h "NICK" ircNick
ircWrite h "USER" $ ircNick ++ " 0 * :" ++ ircUser
- ircEvalLoop h (DispatchEnv state { currentChannel = ircChannel } conf dispatch)
+ ircEvalLoop h (DispatchEnv state { isReady = False, currentChannel = ircChannel } conf dispatch)
return ()
ircEvalLoop :: Handle -> Env -> IO ()
@@ -84,11 +84,11 @@ ircEvalLoop h env = do
}
ircEval :: Handle -> IrcMessage -> Env -> IO Env
-ircEval h msg env@(DispatchEnv state _ dispatch) = ircEval' (clean msg)
+ircEval h msg env@(DispatchEnv state conf dispatch) = ircEval' (clean msg)
where
ircEval' "+x" = do
ircWrite h "JOIN" (currentChannel state)
- return (env)
+ return (DispatchEnv state { isReady = True } conf dispatch)
ircEval' cleanMsg = do
(Env s c) <- dispatch cleanMsg sendReplyMsg (castEnv env)
return (DispatchEnv s c dispatch)