diff options
author | Tom Smeding <tom@tomsmeding.com> | 2022-10-14 09:52:06 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2022-10-14 09:52:06 +0200 |
commit | a4636014ab24c810e491a5267042fd70e067c2c3 (patch) | |
tree | c21939bcd21472588bb6b2e9c896aa58be8ed71c /src/IRC.hs | |
parent | 0bb8ae15a8ff487df00bc27db67ffa2e587f0eea (diff) |
Flush stdout
Diffstat (limited to 'src/IRC.hs')
-rw-r--r-- | src/IRC.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,11 +4,12 @@ import Control.Monad (forM_) import Control.Monad.IO.Class (liftIO) import qualified Data.ByteString.Char8 as Char8 import Data.Char +import Data.Text (Text) +import qualified Data.Text as T import Network.IRC.Client -- import Network.IRC.Client.Events import Lens.Micro -import Data.Text (Text) -import qualified Data.Text as T +import System.IO (hFlush, stdout) connectIRC :: (Text -> Bool) -> (Text -> IO [Text]) -> IO () @@ -49,6 +50,7 @@ noticeHandler = EventHandler _ -> Nothing) (\_ () -> do liftIO $ putStrLn "Identification confirmation received, joining channel" + liftIO $ hFlush stdout send $ Join (T.pack "#haskell")) privmsgHandler :: (Text -> Bool) -> (Text -> IO [Text]) -> EventHandler s |