Archived
1
0
Fork 0

Began a complete rewrite of command and plugin management.

Wrote a command routing statement, added an IrcPlugin monad.
This commit is contained in:
Julien Dessaux 2010-02-04 21:05:37 +01:00
parent 047a10bc9b
commit fd8d5faf5f
12 changed files with 244 additions and 87 deletions

View file

@ -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