Skip to content

dagbrown/flooterbuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F L O O T E R B U C K !

-- What Flooterbuck does

Flooterbuck is an Infobot.  It goes onto IRC and sits in a channel that you
pick for it, and learns, remembers, and gives back useful information.

<dagbrown> flooterbuck, convert 3 tonnes to nautical elvis
<flooterbuck> dagbrown: 3 tonnes is 22.5341 nautical elvis.
<dagbrown> flooterbuck: My hair is wet
<flooterbuck> dagbrown: Okay.
<dagbrown> flooterbuck, what is a Norse?
<flooterbuck> dagbrown: A Norse is a Norse, of course, of course

-- Note:  Flooterbuck Infobot vs. Infobot

Flooterbuck Infobot (http://flooterbuck.sf.net/) is a rewrite of
Kevin Lenzo's (apparently abandoned) Infobot (http://www.infobot.org/).
Flooterbuck is meant to be cleaner, more modular, and more hackable than
the original Infobot.

The authors of Flooterbuck Infobot believe that all of the old Infobot
functionality has been preserved.  However, it is still recommended that
you keep your old installations of Infobot around, just in case you find
that there is something necessary which only exists in the old Infobot
(and in that case, please contact the authors of Flooterbuck).

Theoretically, you can copy all of the .db files and the conf/*.config
files from your old Infobot installations into your Flooterbuck installation
and it will work.  However, you may not get all of the new features of
Flooterbuck that way -- you should at least have a look at the sample
configuration file included with Flooterbuck to see if there's any new
features that you want to enable.

For more information on the differences between Flooterbuck and
Infobot, please see the REVISIONS files.



-- Very minimal setup instructions

You will need to update your infobot.config
and infobot.users.  See the example files.

This requires perl 5.

You should be able to start up just by running
infobot.  If you are using macperl, you will
(currently) have to make one minor change (because
$^O didn't work for me under os8).

The infobot uses parameter files, typically in the
params directory, to set up with.  It treats anything
on the command line as a parameter file and tries to
load it.

If you are using macperl, you will want to set
the value of the macperl parameter to 1 in the
two given param files (in the 'files' dir).

By default, the infobot uses the IRC setup.  This
may change.  NOTE that the irc version has no output
by default; you'll have to turn up the debug level
to get more.

to start up the infobot, just invoke it from the
command line.

   infobot



-- A note on forms

You can prepend the tag <reply>
to values in the db to just get a reply with no
extra info.

e.g.

   x => <reply> y

then when you ask 'x?' it will just reply 'y' instead
of something like "i think x is y".




-- Extending the bot by adding your own code

You can place your module in the modules directory.  It needs to define a
package with the same name as the file itself (without the .pm extension).  It
needs to define a subroutine named scan() that takes a callback function, a
message, and the nick of the person who wrote that message.

The callback function is the function which, when called with an
argument, will reply to the query in the appropriate way.  That is,
if the query was originally a private message, the callback function
will reply via private message.  If the query was a message in a
channel, the callback function will send the reply to the correct
channel.

If the module does not "catch" a message, then scan() function should
return undef to allow the message to "fall through" to other modules.

The best way to figure all this out is to look at one of the many modules
provided as a reference.

Oh, and if the module you added would be of interest to other Flooterbuck
users, you might want to consider contributing that code to the project.
Flooterbuck can be found on Sourceforge at http://flooterbuck.sf.net/



-- Disabling features of the bot

Nearly everything that Flooterbuck does (beside the actual communication
with the IRC server) is handled by the modules in the modules directory.
Although some modules can be enabled or disabled by changing the configuration
files, you can disable any module by simply deleting it or moving it to
a different directory.



-- update_db & dump_db

update_db is a little perl script that will take a
flat ascii file and make an infobot-style db out
of it (currently just a couple of dbm files). You'll
want to make 2, even if theye contain only 1 element
each.  it will also simply add (and overwrite entries
in) existing dbs.  This is especially nice if
you don't allow updates to the databases through IRC
and just want a collection of permanent factoids.

update_db <inputfile> <dbname>

where <inputfile> is an ascii file like (in the case
of an url-style infobot):

infobot => at http://www.cs.cmu.edu/~lenzo/hocus.html

one key => value per line.  In the current setup,
you need an is-database and an are-database, mainly
for legacy reasons about representing plurality and
being able to give the proper form.  in the infobot-is.txt
file and infobot-are.txt files you have examples.  these
are a fine starting point:

1.1  update_db infobot-is.txt infobot-is
     update_db infobot-are.txt infobot-are

2. Now you need to edit infobot to set up your bot.
   Don't forget to set the path to perl properly at
   the top and make it executable.

3. Then try running infobot.  At present, there's a
   bunch of VERY BAD code in it, so don't use the -w
   switch unless you want to fix a bunch of things and
   mail me.

Eventually, kill it and then you'll probably
want to crontab it.  included is a sample crontab
and the script that you will need to edit.

dump_db <dbname>

will just make a flat ascii file out of the named db,
e.g.

   dump_db infobot-is

Both update_db and dump_db take an optional switch, -m, which tells them
what DBM module to use.  You'll need to specify this if you set
DBMModule in your config file in order to get the bot to use something
other than Perl's default.  Eg,

   update_db -m DB_File infobot-is.txt infobot-is
   dump_db   -m DB_File infobot-is

good luck, and mail me!

kevin
lenzo@cs.cmu.edu

ps - i am just releasing this _now_ instead of waiting
     to fix everything.  If you use this and like it,
     or even if you don't, please mail me!



-- Thanks to:

Kevin Lenzo and his team for the original Infobot.


About

A fork of the ancient infobot project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages