From c8911057904e16aac53652311d0a131491b413a0 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 15 Jun 2022 13:12:37 +0200 Subject: Less logging --- src/IRC.hs | 3 ++- src/Main.hs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/IRC.hs b/src/IRC.hs index 36cb1c3..7e78c50 100644 --- a/src/IRC.hs +++ b/src/IRC.hs @@ -20,7 +20,7 @@ connectIRC commandDetect msgFun = do & username .~ T.pack "yahb2" & realname .~ T.pack "Bot operated by tomsmeding" & password .~ Just (T.pack (trim pass)) - & logfunc .~ stdoutLogger + & logfunc .~ noopLogger let cfg = defaultInstanceConfig (T.pack "yahb2") & handlers .~ @@ -48,6 +48,7 @@ noticeHandler = EventHandler -> Just () _ -> Nothing) (\_ () -> do + liftIO $ putStrLn "Identification confirmation received, joining channel" send $ Join (T.pack "#haskell")) privmsgHandler :: (Text -> Bool) -> (Text -> IO [Text]) -> EventHandler s diff --git a/src/Main.hs b/src/Main.hs index cc4fda2..88a7259 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -28,6 +28,7 @@ mainIRC = do connectIRC (\t -> T.take 2 t == T.pack "% ") (\recvmsg -> do + putStrLn $ "Responding to " ++ T.unpack recvmsg ghci <- takeMVar ghcivar (ghci', msgs) <- runInGhci ghci (T.drop 2 recvmsg) putMVar ghcivar ghci' -- cgit v1.2.3-70-g09d2