From fd8d5faf5f4ab085b01316e15403779ca30cf3f9 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 4 Feb 2010 21:05:37 +0100 Subject: Began a complete rewrite of command and plugin management. Wrote a command routing statement, added an IrcPlugin monad. --- Hsbot/Utils.hs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Hsbot/Utils.hs') 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 -- cgit v1.2.3