summaryrefslogtreecommitdiff
path: root/Hsbot/Main.hs
blob: 5ff138b5f42d9251838beda747ac8ca6b02ad306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module Hsbot.Main
    (imain
    ) where

import System.IO
import System.Plugins

import qualified Config as C
import Hsbot.Core
import Hsbot.IRC

type Reboot = (Module -> Bot -> IO ())

-- | Bot's first main entry point
imain :: Module -> Reboot -> IO ()
imain modul' reboot = imain' modul' reboot newbot

-- | Bot's main entry point
imain' :: Module -> Reboot -> Bot -> IO ()
imain' modul' reboot bot = do
    servers' <- mapM connectServer (ircServers C.config)
    mapM_ initServer servers'
    return ()