Began a complete rewrite of command and plugin management.
Wrote a command routing statement, added an IrcPlugin monad.
This commit is contained in:
parent
047a10bc9b
commit
fd8d5faf5f
12 changed files with 244 additions and 87 deletions
|
@ -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
|
||||
|
||||
|
|
Reference in a new issue