funbot-0.2: src/FunBot/Config.hs
{- This file is part of funbot.
-
- Written in 2015 by fr33domlover <fr33domlover@rel4tion.org>.
-
- ♡ Copying is an act of love. Please copy, reuse and share.
-
- The author(s) have dedicated all copyright and related and neighboring
- rights to this software to the public domain worldwide. This software is
- distributed without any warranty.
-
- You should have received a copy of the CC0 Public Domain Dedication along
- with this software. If not, see
- <http://creativecommons.org/publicdomain/zero/1.0/>.
-}
module FunBot.Config
( stateSaveInterval
, configuration
, webListenerPort
, feedErrorLogFile
, feedVisitInterval
, settingsFilename
, memosFilename
)
where
import Data.Time.Interval (time)
import Data.Time.Units
import Network.IRC.Fun.Bot.Types (Connection (..), Config (..))
stateSaveInterval = 3 :: Second
configuration = Config
{ connection = Connection
{ server = "irc.freenode.net"
, port = 6667
, tls = False -- not supported yet
, nick = "bot_test_joe"
, password = Nothing
}
, channels = ["#freepost-bot-test"]
, logDir = "state/chanlogs"
, stateRepo = Nothing
, stateFile = "state/state.json"
, saveInterval = time stateSaveInterval
, botEventLogFile = "state/bot.log"
}
webListenerPort = 8998 :: Int
feedErrorLogFile = "state/feed-error.log"
feedVisitInterval = 5 :: Minute
-- | If you set a repo path in the configuration above ('stateRepo' field),
-- then this path is relative to that repo and the settings file will be
-- commited to Git. Otherwise, this path is relative to the bot process working
-- dir (or absolute), and Git won't be used.
settingsFilename = "state/settings.json"
-- | If you set a repo path in the configuration above ('stateRepo' field),
-- then this path is relative to that repo and the memos file will be commited
-- to Git. Otherwise, this path is relative to the bot process working dir (or
-- absolute), and Git won't be used.
memosFilename = "state/memos.json"