AltSci Concepts

Linhat/AltBot IRC Bot
by Joel R. Voss aka. Javantea
jvoss@altsci.com
jvoss@myuw.net
Dec 6-7, 2005

Linhat AI 0.2.2 Source [sig]

DESCRIPTION

Linhat1/AltBot is an IRC Bot written in Perl. It uses MySQL database backend. AltBot is famous on #neg9 for awesome replies.
(18:52:38) Javantea: altbot concepts
(18:52:39) AltBot: Javantea: Source code now available at: https://www.altsci.com/concepts/linhat_ai1.html
(19:02:48) Javantea: altbot is male
(19:02:48) AltBot: Javantea: mechanical faithlessly males extreme acquired fleets ecclesiastical overhears genius bone demolished taproot waistcoat osteopathy dynamism impressiveness imagining serializability bonny preambles bulls
(19:02:55) Javantea: see?
(19:03:01) MrPrimate: yeah.
(19:03:01) AltBot: MrPrimate: yeah it is awesome

Although AltBot seems to be awesome and perfect, it is a very new project and has a long ways to go. There are a lot of improvements that would make AltBot quite excellent. Look for them coming soon.

REQUIREMENTS

Linhat1/AltBot requires Perl, Net::IRC for Perl, DBI for Perl, and a MySQL server. Linhat has been tested on Linux and OpenBSD successfully. New versions require Digest::SHA1.

METHODS

AltBot is very simple and it will stay that way for some time. It uses mysql database (as a simple irc log) to search for relevant data. It searches only on one keyword. It finds a keyword by removing the common English grammar, then picking at random. Also, on the sql select, it does order by rand() to make the output more random. A new module adds regex-based censorship to AltBot. Currently, on the live server, the only phrase that AltBot is censored from saying is "New Post :: ", which he was saying far too often. cpmhat says that line every time a post is made on neg9.org. If you, like I, have been awaiting the shutup command for altbot, wait no longer. See below.

USAGE

# connect to efnet and join #altsci or #neg9.
perl linhat_ai1_irc.pl irc.vel.net

# Command-line interface to linhat.
# One command per execute.
perl linhat_ai1.pl
# Usage: linhat_ai1.pl [-u user] [-c | -s] [-f] [-h]
#  -u user    Specify the user.
#  -c         Use PFM/china2.pm to get data.
#  -s         Use STDIN to get data [default].
#  -f         Do not input data, only search.
#  -h         Display this Usage information.

# get some random words from dict.
perl china2.pl

# Remove unuseful words/punctuation from a sentence.
perl remove_grammar1.pl
In irc
altbot: hello
altbot, what's up?
altbot fears censorship.

# to mute altbot for 50 events,
# simply say any of the following:
altbot: shutup
altbot shut up
altbot, you'd do well to shut up

More detailed information coming soon.

If you are interested in developing Linhat1/AltBot, feel free to e-mail me.