summaryrefslogtreecommitdiff
path: root/Hsbot/Config.hs
diff options
context:
space:
mode:
authorJulien Dessaux2011-04-24 23:08:06 +0200
committerJulien Dessaux2011-05-01 03:28:22 +0200
commit864a364da99a0ec05f08d7cfbad4abde416a0b06 (patch)
tree40e92cdd6913aaa0121584c3c3e7436cdf38d926 /Hsbot/Config.hs
parentContinue refactoring, worked on the core loop and the plugin infrastructure. (diff)
downloadhsbot-864a364da99a0ec05f08d7cfbad4abde416a0b06.tar.gz
hsbot-864a364da99a0ec05f08d7cfbad4abde416a0b06.tar.bz2
hsbot-864a364da99a0ec05f08d7cfbad4abde416a0b06.zip
Some API refactoring.
I can't say how I hate the Types.hs thing in Haskell!
Diffstat (limited to '')
-rw-r--r--Hsbot/Config.hs27
1 files changed, 2 insertions, 25 deletions
diff --git a/Hsbot/Config.hs b/Hsbot/Config.hs
index 1f9329b..d51387b 100644
--- a/Hsbot/Config.hs
+++ b/Hsbot/Config.hs
@@ -1,28 +1,14 @@
module Hsbot.Config
- ( Config (..)
- , TLSConfig (..)
- , defaultConfig
+ ( defaultConfig
, defaultTLSConfig
, 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
- , configAddress :: String
- , configPort :: PortID
- , configChannels :: [String]
- , configNicknames :: [String]
- , configRealname :: String
- , configPlugins :: [(String, Chan Message -> Chan Message -> IO ())]
- }
+import Hsbot.Types
defaultConfig :: Config
defaultConfig = Config
@@ -35,15 +21,6 @@ defaultConfig = Config
, configRealname = "The One True bot, with it's haskell soul."
, configPlugins = [] }
-data TLSConfig = TLSConfig
- { sslOn :: Bool
- , sslCert :: String
- , sslKey :: String
- , sslVersions :: [Network.TLS.Version]
- , sslCiphers :: [Network.TLS.Cipher]
- , sslVerify :: Bool
- } deriving (Show)
-
defaultTLSConfig :: TLSConfig
defaultTLSConfig = TLSConfig
{ sslOn = True