Join & Part abilities now require you to be an admin
[infinity.git] / Config.hs
blob472cce2ea9c506b370cbed9ce84f8a2f9e854e3a
1 -- | This is the configuration file, which specifies
2 -- what servers the bot joins, the prefix for commands,
3 -- and what plugins are enabled
4 module Config (Config(..),config) where
5 import Data.Set
6 import Infinity.Core
7 import Infinity.Plugins
8 -- After this point, you should include any plugins you want
9 -- to have included into the bot. Naturally, you can reconfigure
10 -- this at runtime.
11 import Infinity.Plugins.HelloWorld
12 import Infinity.Plugins.StateTest
13 import Infinity.Plugins.Fortune
14 import Infinity.Plugins.System
15 import Infinity.Plugins.Unlambda
17 -- | Configuration data type, specifies command
18 -- prefixes and all servers that're connected to
19 data Config = Config {
20 commandPrefixes :: String, -- ^ command prefixes, i.e. @[\'>\',\'@\',\'?\']@
21 servers :: [Server], -- ^ list of 'Server'\'s to connect to.
22 enabledplugins :: [IModule] -- ^ List of enabled plugins
25 -- | Describes a single IRC Server, you can just follow the
26 -- same template. To see the full datatype, check Infinity/Core.hs
27 freenode = Server {
28 address = "irc.freenode.org",
29 port = 6667,
30 channels = fromList ["#bot-battle-royale"],
31 nickname = "infinitybot",
32 password = "",
33 realname = "time copper",
34 administrators = fromList ["thoughtpolice"]
38 config = Config {
39 commandPrefixes = ['?','@','>'],
40 servers = [freenode],
41 enabledplugins =
42 [ -- Put the desired plugins' data constructors
43 -- in the list below
44 mkplugin System
45 , mkplugin HelloWorld
46 , mkplugin StateTest
47 , mkplugin Fortune
48 , mkplugin Unlambda