Every Ibid lives in a directory, the botdir. This holds the configuration file, logs, caches, the SQLite database if you are using it, and plugins you’ve written.
The botdir should be your current directory whenever you run an ibid-related script, so it can find the configuration file.
All non-absolute paths in the ibid configuration are relative to the botdir.
Note
The botdir is added to the front of sys.path, so any python package that you put in the botdir will be available to the bot, and take precedence over other versions of the same package.
Ibid’s configuration is stored in ibid.ini, created when you install Ibid. You can edit it at any time and tell the bot to reread config or edit it online with the config feature.
A simple example ibid.ini:
botname = joebot
logging = logging.ini
[auth]
methods = password,
timeout = 300
permissions = +factoid, +karma, +sendmemo, +recvmemo, +feeds, +publicresponse
[sources]
[[telnet]]
[[timer]]
[[http]]
url = http://joebot.example.com
[[smtp]]
[[pb]]
[[atrum]]
channels = "#ibid",
nick = $botname
type = irc
auth = hostmask, nickserv
server = irc.atrum.org
[plugins]
cachedir = /tmp/ibid
[[core]]
names = $botname, bot, ant
ignore = ,
[databases]
ibid = sqlite:///ibid.db
This shows the main sections of the file. It is in configobj format, an ini-variant with nested sections. Whitespace is ignored, all values belong to the most recently defined section.
Lines can be commented out by prefixing them with #.
String: The location of the logging configuration file.
Default: logging.ini
String: The engine that MySQL tables will be created in.
Default: InnoDB
This section is for configuring Ibid’s user-authentication. Permissions that are granted …when authed require users to authenticate themselves to the bot before the permission can be invoked. Some sources have special ways of authenticating users (e.g. the nickserv authentication method on IRC) or guarantee that their users are always authenticated via the imlicit authentication method (e.g. jabber).
List: Permissions that are granted to everyone. Although they can be overridden for specific users, using the online grant function.
The name of the permission can be prefixed with a + to indicate that this permission is granted without requiring authentication. Or a - to revoke a permission granted to all users of a source.
Sources are the way that Ibid connects to users. Every IRC/SILC/DC server is it’s own source as are connections to other services.
The configuration parameters that applies to all sources are:
String: The driver that this source should use. This allows you to have more than one IRC source, for example.
Default: The name of the source. If you specify a type, you are free to name the source anything you want to.
List: This lets you grant and revoke permissions to all users on the source. They can be overridden for specific users, using the online grant function.
The name of the permission can be prefixed with a + to indicate that this permission is granted without requiring authentication. Or a - to revoke a permission granted to all users of a source.
Some of the IRC functionality (i.e. NickServ authentication and joining/parting channels) is handled by the irc plugin.
Reqired String: The hostname of the IRC server to connect to.
Ibid does not currently support falling back to alternate servers, so you may want to use a round-robin hostname.
Number: The port to connect to.
Default: 6667
Boolean: Use SSL-encrypted connection to the network.
Default: False
String: The nickname for the bot to use on this network.
Default: The botname
String: The IRC modes to set. Some servers require bots to set mode B.
Default: nothing
List: Channels to join on connection to the network.
Warning
You must include the leading #, but unless you quote each channel, Ibid will see the rest of the config line as a comment.
So use quotes around each channel name like this: "#ibid", "#fun"
String: The password identifying your bot to NickServ. If set, the bot will respond to authentication requests from NickServ.
Default: Nothing
String: The NickServ’s hostmask on this network. You can set this to ensure that you don’t accidentally give your NickServ password to an imposter, should the network’s services module go down.
You can use glob wildcards, i.e. * and ?.
Default: *
String: The NickServ’s nickname on this network. You probably won’t need to change it.
Default: NickServ
Number: How many seconds in between each keep-alive PING sent to the server.
Default: 60
Number: How long to wait for PONGs before giving up and reconnecting.
Default: 300
List: MUC chatrooms to join on connection.
Default: Nothing
List: Domains that the bot will accept messages from. If this isn’t set, it’ll accept messages from anyone.
Default: Nothing (i.e. no restriction)
String: The hostname of the server to connect to.
Default: Determined automatically from the jabber ID.
Number: The port to connect to.
Default: 5222 or 5223 if ssl is True
Boolean: Use old port 5223-style SSL connection instead of opportunistic TLS on port 5222.
Default: False
String: The nickname for the bot to use on this server when in MUC chatrooms.
Default: The botname
Number: The bot will limit public (i.e. MUC) messages to this length (in bytes) to avoid flooding the channel with long messages.
Default: 512
The following permissions are used in Ibid core:
Other permissions used in plugins: