summaryrefslogtreecommitdiff
path: root/Hsbot/Config.hs
diff options
context:
space:
mode:
authorJulien Dessaux2011-04-23 13:35:04 +0200
committerJulien Dessaux2011-04-23 13:35:04 +0200
commitd4be110200ba3f3a2f19236ec3c16f980ab458aa (patch)
tree832402a3a83927b0f3242b2306b4f1a79e681de8 /Hsbot/Config.hs
parentBegan a big refactoring/rewriting (again) (diff)
downloadhsbot-d4be110200ba3f3a2f19236ec3c16f980ab458aa.tar.gz
hsbot-d4be110200ba3f3a2f19236ec3c16f980ab458aa.tar.bz2
hsbot-d4be110200ba3f3a2f19236ec3c16f980ab458aa.zip
Continue refactoring, worked on the core loop and the plugin infrastructure.
Diffstat (limited to '')
-rw-r--r--Hsbot/Config.hs7
1 files changed, 5 insertions, 2 deletions
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