summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2011-11-07 23:03:53 +0100
committerJulien Dessaux2011-11-07 23:03:53 +0100
commitfca73a28e33a2b36192c3a8b5cc1f805a250e074 (patch)
tree60b0e368ea2025c1e33ec6d709e762e2454fa5cc
parentFixed the fix to properly handle incomplete messages when there is nothing mo... (diff)
downloadhsbot-fca73a28e33a2b36192c3a8b5cc1f805a250e074.tar.gz
hsbot-fca73a28e33a2b36192c3a8b5cc1f805a250e074.tar.bz2
hsbot-fca73a28e33a2b36192c3a8b5cc1f805a250e074.zip
Temporary fix for the parsing mistake when not using TLS
-rw-r--r--Hsbot/Core.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs
index d454c77..670afa0 100644
--- a/Hsbot/Core.hs
+++ b/Hsbot/Core.hs
@@ -136,7 +136,7 @@ botReader env handle mctx chan = do
Nothing -> return ()
readThis :: Handle -> Maybe (TLSCtx Handle) -> IO String
readThis _ (Just ctx) = fmap L.toString (recvData ctx)
- readThis h Nothing = hGetLine h
+ readThis h Nothing = hGetLine h >>= \s -> return $ s ++ "\n"
botLoop :: Env IO ()
botLoop = forever $ do