diff options
author | Julien Dessaux | 2010-02-04 21:05:37 +0100 |
---|---|---|
committer | Julien Dessaux | 2010-02-04 21:05:37 +0100 |
commit | fd8d5faf5f4ab085b01316e15403779ca30cf3f9 (patch) | |
tree | 83dfae790dcb184d651567f06929fc69338733a9 /Hsbot/Utils.hs | |
parent | Fixed some types' functions. (diff) | |
download | hsbot-fd8d5faf5f4ab085b01316e15403779ca30cf3f9.tar.gz hsbot-fd8d5faf5f4ab085b01316e15403779ca30cf3f9.tar.bz2 hsbot-fd8d5faf5f4ab085b01316e15403779ca30cf3f9.zip |
Began a complete rewrite of command and plugin management.
Wrote a command routing statement, added an IrcPlugin monad.
Diffstat (limited to 'Hsbot/Utils.hs')
-rw-r--r-- | Hsbot/Utils.hs | 16 |
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 |