404d/Bones-IRCBot — pull request #9 by 404d (2013-09-02 20:11:38+00:00)
Title: Add a factoids module

Adds a factoids module `bones.modules.funserv.Factoids`, which should be pretty self-explainatory. A topic can hold more than one factoid.
*Disclaimer: This module was inspired by the factoids functionality of the `Byakuren` bot from `irc.esper.net/#touhou`.*

Adding factoids is done by saying `+learn is `, with `+` being any kind of prefix your bot is configured to accept. Both fields can contain any characters.
Reading factoids is done by saying `?`. The prefix `?` does not need to be added to the bot config for this to work.

Example:
~~~
~_404`d ) +learn Bones is a bot
%Bones ) _404`d: I understand
~_404`d ) ?Bones
%Bones ) _404`d: Bones is a bot
~~~

* * *

PostgreSQL table scheme:
~~~
create table bones_factoid (
id serial not null primary key,
topic text not null,
fact text not null,
submitter text not null
);
~~~