summaryrefslogtreecommitdiff
path: root/HsbotIrcBot/Hsbot/Irc/Config.hs
diff options
context:
space:
mode:
authorJulien Dessaux2010-07-03 21:26:00 +0200
committerJulien Dessaux2010-07-03 22:40:17 +0200
commit11c2c16835b3e8368be77ccc5b7ddf949021eccd (patch)
tree7733132ee370335156219ff6eb4f0ef2dbd1c8ff /HsbotIrcBot/Hsbot/Irc/Config.hs
parentWrote most of the resume code for the core and the irc plugin. (diff)
downloadhsbot-11c2c16835b3e8368be77ccc5b7ddf949021eccd.tar.gz
hsbot-11c2c16835b3e8368be77ccc5b7ddf949021eccd.tar.bz2
hsbot-11c2c16835b3e8368be77ccc5b7ddf949021eccd.zip
Moved files around as a preliminary for architectural changes.
Diffstat (limited to 'HsbotIrcBot/Hsbot/Irc/Config.hs')
-rw-r--r--HsbotIrcBot/Hsbot/Irc/Config.hs34
1 files changed, 34 insertions, 0 deletions
diff --git a/HsbotIrcBot/Hsbot/Irc/Config.hs b/HsbotIrcBot/Hsbot/Irc/Config.hs
new file mode 100644
index 0000000..0d1e5a2
--- /dev/null
+++ b/HsbotIrcBot/Hsbot/Irc/Config.hs
@@ -0,0 +1,34 @@
+module Hsbot.Irc.Config
+ ( IrcConfig(..)
+ , ircDefaultConfig
+ ) where
+
+import Network
+
+-- | Configuration data type
+data IrcConfig = IrcConfig
+ { ircConfigName :: String -- The configuration name
+ , ircConfigAddress :: String -- the server's address
+ , ircConfigPort :: PortID -- the server's port
+ , ircConfigChannels :: [String] -- the Channels to join on start
+ , ircConfigNickname :: String -- the hsbot's nickname
+ , ircConfigPassword :: String -- the hsbot's password, optional
+ , ircConfigRealname :: String -- the hsbot's real name, optional
+ , ircConfigCommandPrefix :: Char -- the prefix the ircbot will recognize as commands
+ , ircConfigPlugins :: [String] -- the ircPlugins to load
+ }
+
+-- | User configuration
+ircDefaultConfig :: IrcConfig
+ircDefaultConfig = IrcConfig
+ { ircConfigName = "irc-alocalhost"
+ , ircConfigAddress = "localhost"
+ , ircConfigPort = PortNumber 6667
+ , ircConfigChannels = ["#hsbot"]
+ , ircConfigNickname = "hsbot"
+ , ircConfigPassword = ""
+ , ircConfigRealname = "The One True bot, with it's haskell soul."
+ , ircConfigCommandPrefix = '@'
+ , ircConfigPlugins = ["Ping"]
+ }
+