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,7 +1,6 @@
module Hsbot.Core
( connectServer
, disconnectServer
, emptyMsg
) where
import Control.Concurrent
@ -30,7 +29,7 @@ connectServer server = do
chan <- newChan :: IO (Chan BotMsg)
threadId <- forkIO $ botReader handle chan
putStrLn "done."
return (Bot server starttime handle [] M.empty chan threadId M.empty)
return $ Bot server starttime handle [] M.empty chan threadId M.empty
-- | Disconnect from the server
disconnectServer :: Bot -> IO () -- IO Bot ?
@ -53,6 +52,3 @@ botReader handle chan = forever $ do
_ -> do
return ()
emptyMsg :: IrcMsg
emptyMsg = IrcMsg Nothing "EMPTY" []