packages feed

infinity-0.3: Config.hs

module Config (Server(..),Config(..),config) where

-- a datatype describing a particular IRC Server
data Server = Server {
  address        :: String,   -- what server to connect to
  port           :: Int,      -- what port
  channels       :: [String], -- what channels to enter
  nickname       :: String,   -- bot nick
  password       :: String,   -- bot password, can be empty
  realname       :: String,   -- bot's real name
  administrators :: [String]  -- bot admins
}

-- the actual config datatype, defines global config
-- options as well as a list of servers to connect to
data Config = Config {
   commandPrefixes :: String,   -- command prefixes
   servers         :: [Server], -- list of servers to connect to
   logFile         :: FilePath  -- where to log to
}




-- define your servers to connect to here
freenode = Server {
  address        = "irc.freenode.org",
  port           = 6667,
  channels       = ["#bot-battle-royale"],
  nickname       = "infinitybot",
  password       = "",
  realname       = "time copper",
  administrators = ["thoughtpolice"]
}


-- your config options
config :: Config
config = Config {
  commandPrefixes = ['?','@','>'],
  servers         = [freenode],
  logFile         = "Log/infinity.log"
}