diff options
author | Julien Dessaux | 2010-05-29 16:59:41 +0200 |
---|---|---|
committer | Julien Dessaux | 2010-05-29 17:05:56 +0200 |
commit | 57bec4921b02e745f412e954ea4a4ec6b3c31b3b (patch) | |
tree | 3cca9e3630772cd9594442ff3ff2101a80599a4d /Hsbot/Core.hs | |
parent | Implemented the clean killing of plugins' threads. (diff) | |
download | hsbot-57bec4921b02e745f412e954ea4a4ec6b3c31b3b.tar.gz hsbot-57bec4921b02e745f412e954ea4a4ec6b3c31b3b.tar.bz2 hsbot-57bec4921b02e745f412e954ea4a4ec6b3c31b3b.zip |
Rationalized the way bot configs are handled.
Diffstat (limited to '')
-rw-r--r-- | Hsbot/Core.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs index fac9f8e..025e0c5 100644 --- a/Hsbot/Core.hs +++ b/Hsbot/Core.hs @@ -17,18 +17,18 @@ import Hsbot.Plugin import Hsbot.Types -- | Bot's main entry point -hsbot :: Config -> IO () +hsbot :: [BotConfig] -> IO () hsbot config = do startTime <- getCurrentTime putStrLn "[Hsbot] Opening communication channel... " chan <- newChan :: IO (Chan BotMsg) mvar <- newMVar M.empty :: IO (MVar BotResumeData) putStrLn "[Hsbot] Spawning IrcBot plugins... " - botState <- execStateT spawnIrcPlugins BotState { botStartTime = startTime - , botPlugins = M.empty - , botChan = chan - , botConfig = config - , botResumeData = mvar } + botState <- execStateT spawnPlugins BotState { botStartTime = startTime + , botPlugins = M.empty + , botChan = chan + , botConfig = config + , botResumeData = mvar } putStrLn "[Hsbot] Entering main loop... " (status, botState') <- runLoop botState putStrLn "[Hsbot] Killing active plugins... " |