aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-11-02 20:10:32 +0100
committerTom Smeding <tom@tomsmeding.com>2022-11-02 20:10:32 +0100
commit377757efa4207ee7238477b915808eb1ff115004 (patch)
tree25a109421faad8ea4aae80a18f7cceabcce8f8ba /src
parent497ea94f804b59c4c9c8b7f988fa7df9fcd3848f (diff)
Add commented-out stdoutLogger implementation
Diffstat (limited to 'src')
-rw-r--r--src/IRC.hs11
1 files changed, 10 insertions, 1 deletions
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