diff options
author | Tom Smeding <tom@tomsmeding.com> | 2022-11-02 20:10:32 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2022-11-02 20:10:32 +0100 |
commit | 377757efa4207ee7238477b915808eb1ff115004 (patch) | |
tree | 25a109421faad8ea4aae80a18f7cceabcce8f8ba /src | |
parent | 497ea94f804b59c4c9c8b7f988fa7df9fcd3848f (diff) |
Add commented-out stdoutLogger implementation
Diffstat (limited to 'src')
-rw-r--r-- | src/IRC.hs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 |