summaryrefslogtreecommitdiff
path: root/Hsbot/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Hsbot/Utils.hs')
-rw-r--r--Hsbot/Utils.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/Hsbot/Utils.hs b/Hsbot/Utils.hs
index 1c40362..b84b028 100644
--- a/Hsbot/Utils.hs
+++ b/Hsbot/Utils.hs
@@ -1,5 +1,7 @@
module Hsbot.Utils
- ( inColor
+ ( error
+ , errorM
+ , inColor
, sendstr
, trace
, traceM
@@ -29,10 +31,12 @@ trace msg = putStrLn msg
-- | Log a message string
traceM :: String -> IrcBot ()
-traceM msg = liftIO $ putStrLn msg
+traceM msg = liftIO $ trace msg
------------------
--- | Helpers | --
------------------
--- sendRegister
+-- | Logs an error message
+error :: String -> IO ()
+error msg = trace $ inColor msg [31]
+
+errorM :: String -> a ()
+error msg = liftIO $ error msg