The infobot connects to an Internet Relay Chat (IRC) server,
joins some channels (maybe), and begins accumulating factoids.
To run one, download the source, uncompress it, untar it,
edit the config files, and it up.
Interacting with the bot is pretty straightforward. Most of
the commands and variables available to users are listed below.
The bot will interact via message or on-channel.
|Interacting with an Infobot
- setting factoids: X is Y
Saying something like "X is Y" somewhere that the infobot
can see it will cause the bot to store a factoid, unless
X is already defined. It sets the value of X to Y.
- accessing factoids: What is X?
You can ask an infobot about something in a number of
different ways, including "what is X?", "where is X?",
or just plain "X?".
- altering factoids: s/A/B/
if you just want to change a part of a factoid, use
s///operator. you have to address the bot
or use a private medium to do this.
MyBot, X =~ s/A/B/
will change the first occurence of A to B in the factoid
- appending to existing entries:
One can extend an existing factoid using the
poink is also a silly word
- erasing a factoid:
A factoid can easily be deleted by using
infobot, forget poink
- changing a factoid:
You can change the entry for a factoid completely using
no, infobot, x is wugga wugga.
which deletes the prior entry (if possible)
and replaces it with the new one.
- having the bot tell someone else something:
A user can ask an infobot to tell someone else something.
infobot, tell fimmtiu about no web
- karma / plusplus
karma for a concept may be incremented or decremeted using
--. You can get the
current karma 'score' for something by asking for it.
karma for oznoid
infobots reply to status requests.
-> [url] status
[url!infobot@ALF5.SPEECH.CS.CMU.EDU] Since Fri Mar 26 06:42:27 1999, there have been 409
modifications and 2604 questions. I have been awake for 5 days, 4 hours, 24 minutes,
18 seconds this session, and currently reference 47529 factoids.
- joining an allowed channel:
On IRC, you can tell the infobot to join a channel
that it's allowed to join with
If it is allowed to (in its paramter settings), it
will try to join the channel.
- leaving a channel:
This causes the bot to leave the given channel
leave is a synonym for
- random responses with
You can set a list from which to pick a random response by
When x is asked about, the infobot will randomly choose from
<reply> factoid tag.
Normally, when the infobot replies to "What is X", it says
"X is Y". This form makes it just reply "Y".
<action> factoid tag (as of 0.43.5)
This causes the bot to respond as with except
as an ACTION.
\ to protect items from evaluation.
will normally set
x =is=> y is y, but
no (update) operators apply before checking
for this. This is also useful for getting around the
dereferencing of "i" and "me" and so on.
Contains the nickname person currently addressing the bot.
It can be used effectively in replies.
nice day is <reply> you betcha, $who.
Contains the current date and time, at the bot's host.
weather for KAGC (0.43.6+)
Retrieves the weather from NOAA station KAGC. See www.noaa.gov.
Note: Requires LWP.
Retrieves METAR info from NOAA station KAGC. See www.noaa.gov.
Note: Requires Geo::METAR and LWP.
performs DNS lookup or reverse-lookup on the hostname or IP.
gets the internic WHOIS record
gets the traceroute results from the bot's machine to the target machine. Summary only.
- imdb, websters, foldoc
outputs a well-formed url for a search of IMDB (the Internet Movie DataBase), the Webster's 1913 dictionary, or the foldoc dictionary of geek terms.
imdb for clerks
webster for lucre
- New in 0.44.3:
returns the value without the usual post-processing.
change 100 USD to DEM
converts currency. Retrieves the current exchange rates from the net.
looks up the RSS file (RDF Site Summary) and returns it
in-place where the tag is. Requires XML::RSS and LWP.
give me an excuse, or
connects to the excuse server and returns an excuse.
- Ignoring users: ignore nickname, ignore *.a.com
Users with the P (oP) flag can tell the bot
to ignore people or hostmasks. And 'unignore'.
use 'ignorelist' to get the current list of ignored masks,
if you have the P flag.
op on channel
The 'p' (oP) flag in the userfile allows this
to work. You'll need to set a hostmask. See
files/infobot.users Also uses a
/msg <bot> <password> op
If the bot owner (+O, Owner) says this or messages it to the bot,
it will kill itself.
The infobot comes with some scripts for working with
the DBM files.
This takes a flat ascii file and inserts it into a DBM file.
It creates a new DBM if it didn't exist.
scripts/update_db factpacks/code_to_country.txt infobot-is
will add the factoids in
The converse. It dumps out the DBM file to a flat
ascii file. Note there is no extension on the DBM name,
even though the system may use one.
Note there is no extension on the DBM name, even though the
system may use one (like
This is incomplete, it's gotten to be quite difficult to keep this documentation up to date on all of the new additions being submitted and added.|
nickometer, by Adam Spiers. Guages
how 'lame' a nickname is, as a percentage!
babel.pl by jdf. translates using the
web site for machine translation.
In this implementation, English is assumed
to be the 'main' language, thus everything is
(x|translate) (to|from) (de|fr|pt|es|it|german|french|portugese|spanish|italian)
translate to german this is a test
x to german this is another test
x to de and a third
x from de ein bisschen Deutsch
German, French, Spanish, Italian, and Portugese are
currently supported by babelfish.
METAR support, courtesy of mendel
retrieves METAR information for KAGC, the Allegheny
County airport station.
NOAA weather station support, courtesy of oznoid
weather information from (in this example) KAGC. uses the
as metar info.
slashdot headlines, originally from Chris Tessone,
current version from Rahga.
retrieves the current slashdot headlines from
- W3Search: search web engines for links; thanks
to Simon Couzins for this one. Requires
WWW::Search and WWW::Search::Google.
Currently supports what WWW::Search and WWW::Search::Google
support, namely: Dejanews, Google, Gopher, Excite, Infoseek,
HotBot, Lycos, AltaVista, Magellan, PLweb, SFgate, and Verity.
search google for foo
google for foo
altavista for foo
dejanews for foo
- US Airways In-flight info.
retrieves the in-flight information for the
appropriate USAir flight. Note: Requires LWP.
- editing the parameter file
The parameter file, usually in
is the most direct way to customize the settings on your infobot.
- editing the user file
The user file, usually in
is the most direct way to customize the settings on your infobot.
- editing the main script
There are certain items you may need to fiddle with
in the main script of the infobot, but normally you
shouldn't have to. The usual reasons are
- changing the bang path to perl
If you get
infobot: Command not found.
or something like it, you need to edit the infobot
script at the top level directory (the script named
'infobot') and set the path to you perl interpreter
in the very first line of the script to
with, of course, the full path to your perl binary.
- explicitly setting normally relative paths
If you don't have . in your path, you will probably
need to set some variables explicitly that are normally
determined relative to the infobot script. This is
done in the 'infobot' script.
- Installing Modules to enable features
Several add-ons, like
search require perl modules to
be installed. The easiest way to get all the
things you need is to install the CPAN.pm module,
available from CPAN, and use it to install what you need. This
is best done as root.
Once you have the CPAN module installed, use
it to install the required modules:
Once these are installed, start or restart your infobot.
- the main thing:
- for METAR:
- for W3Search:
- starting it up
This should be as simple as entering the infobot
parent directory and executing
This starts up the script and generates a whole lot of text.
It's useful and interesting to see what's going on "in the
infobot's head". You can control the amount of verbage
that comes out with the
of you can dump all the output to the bitbucket and background
the process at the same time with
nohup infobot > /dev/null &
- the console
Should you choose to look at the stream if consciousness
in the bot, and you haven't reduced the output to nothing
or consigned it to the void, you will be presented with
The first thing you should see, assuming all goes well with
making a connection, is the motd (message-of-the-day)
of the server the bot has been configured to connect to.
Next, you should see the result of the channel joins specified
in the parameter files, and you may see the bot recognizing
hostmasks of people in the userfile, if any have been put
If you have the
ansi_control paramter set,
and your terminal supports it, the output will be in color.
NOTE that the 'console' is NOT interactive. You can't
type anything into it; it's just for viewing what's going on.
cronning the infobot
You can set the infobot to automatically start up using
cron. See the included example
If you have set yourself as the bot's master in the user file
infobot.users, unless you changed the default),
you can just say or message 'die' to the bot.
Otherwise, kill the process or hit control-c in the console.