From 377757efa4207ee7238477b915808eb1ff115004 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 2 Nov 2022 20:10:32 +0100 Subject: Add commented-out stdoutLogger implementation --- src/IRC.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/IRC.hs b/src/IRC.hs index ac88a78..fdcf90e 100644 --- a/src/IRC.hs +++ b/src/IRC.hs @@ -2,11 +2,12 @@ module IRC where import Control.Monad (forM_) import Control.Monad.IO.Class (liftIO) +-- import Data.ByteString (ByteString) 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 hiding (stdoutLogger) -- import Network.IRC.Client.Events import Lens.Micro import System.IO (hFlush, stdout) @@ -68,3 +69,11 @@ privmsgHandler commandDetect msgFun = EventHandler forM_ mtarget $ \target -> forM_ msgs $ \msg -> send $ Privmsg target (Right msg)) + +-- stdoutLogger :: Origin -> ByteString -> IO () +-- stdoutLogger origin x = do +-- putStrLn $ unwords +-- [ if origin == FromServer then "<---" else "--->" +-- , init . tail $ show x +-- ] +-- hFlush stdout -- cgit v1.2.3-70-g09d2