From d4be110200ba3f3a2f19236ec3c16f980ab458aa Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 23 Apr 2011 13:35:04 +0200 Subject: Continue refactoring, worked on the core loop and the plugin infrastructure. --- Hsbot/Config.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Hsbot/Config.hs') diff --git a/Hsbot/Config.hs b/Hsbot/Config.hs index 7ab23f5..1f9329b 100644 --- a/Hsbot/Config.hs +++ b/Hsbot/Config.hs @@ -6,10 +6,13 @@ module Hsbot.Config , noSSL ) where +import Control.Concurrent.Chan import Network +import qualified Network.IRC as IRC import Network.TLS import Network.TLS.Extra +import Hsbot.Message data Config = Config { configErrors :: Maybe String , configTLS :: TLSConfig @@ -18,7 +21,7 @@ data Config = Config , configChannels :: [String] , configNicknames :: [String] , configRealname :: String - , configPlugins :: [String] + , configPlugins :: [(String, Chan Message -> Chan Message -> IO ())] } defaultConfig :: Config @@ -30,7 +33,7 @@ defaultConfig = Config , configChannels = ["#hsbot"] , configNicknames = ["hsbot"] , configRealname = "The One True bot, with it's haskell soul." - , configPlugins = ["Ping", "Core"] } + , configPlugins = [] } data TLSConfig = TLSConfig { sslOn :: Bool -- cgit v1.2.3