From 57bec4921b02e745f412e954ea4a4ec6b3c31b3b Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 29 May 2010 16:59:41 +0200 Subject: Rationalized the way bot configs are handled. --- Hsbot/Core.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Hsbot/Core.hs') 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... " -- cgit v1.2.3