ConfuciusBot User's Guide
About
ConfuciusBot (formerly known as EchoBot) is an IRC bot. I wrote ConfuciusBot (poorly) in Perl, using the Net::IRC module. I received a lot of help from Hippie Jim (thanks Hippie). The main reason I wrote this bot was for the "wisdom" feature, which is a lot of fun. After that, it seemed logical to expand the functionality of the bot, and add some utility commands. Maybe someday I'll put the code in a presentable form and make it available for download.
Commands
There are only two ways to give commands to the bot: via the channel the bot resides in, or via a private message (/msg on most clients) to the bot. If you are giving the command in the channel, then it must be preceeded with a period (e.g. ".help"). In a private message, the period is optional. For most commands, the ConfuciusBot will reply through the same means that the command was given.
Information
Just some useful and informative commands.help
Displays the URL to this document.
time
Shows the current date and time (currently hardcoded to Eastern time).
date
Same as "time".
idle
Tells you how long it has been since someone last spoke in the channel.
dns <name>
Displays the specified user's IP address. The text given for <name> can be a partial name, and the bot will search for a user name that matches.
tell <name> <message>
Restates <message> when <name> speaks in the channel. Partial names may be given. Tells expire and are deleted if no recipient is found after 7 days.
Logging
ConfuciusBot logs the conversation and events that take place in the channel. This log can be accessed in a couple of
ways.log
Displays the URL for the HTML version of the channel log. This HTML is generated every 15 minutes, unless specifically triggered by this command or the "save" command.
save
Causes the bot to write the HTML log files.
last <#>
The bot will send you, in a private message, the most recent lines of lines of the log, where <#> is the number of lines you want to see. This works for up to 30 lines, unless the bot recently started up and is not aware of that many lines.
last since <text>
Similar behavior as the "last <#>" command. The bot returns the last line containing <text> and the lines that follow it, but only if <text> appears in the last 30 lines.
since <text>
Same as "last since <text>".
Wisdom
ConfuciusBot can remember an unlimited number of bits of "wisdom". Wisdom is a bit of text that someone gives to the
bot, and in return the bot recites a peice of older wisdom. It will only speak wisdom that it has been given in
the past, and it will never speak the same wisdom twice, unless it has been told that wisdom twice.wisdom <text>
This pushes <text> into the wisdom queue. If the queue is below it's minimum capacity (the default is 300 lines), the ConfuciusBot will not return any wisdom. If the queue is at or above it's minimum, a random wisdom will be chosen from a certain number of the oldest wisdoms (the default is the oldest 50), and displayed to the channel. If this command is sent via a private message, it functions the same as the "push" command.
wisdom (no arguments)
If the "wisdom" command is used with no arguments, it works the same as above, except no wisdom is added to the queue. This command only works when the queue is above it's minimum capacity, and only when given in the IRC channel.
push <text>
This works the same as the "wisdom <text>" command above, but no wisdom is ever returned.
remember <text>
Same as the "push" command.
keep
This will requeue the most recently dequeued wisdom. No wisdom is returned.
wisdomtest <text>
This command does not affect the wisdom file, and instead simply returns the wisdom you give it. The purpose of this command is to see how a peice of wisdom might look when it is dequeued. This is useful because wisdoms can contain some special characters. When wisdom is dequeued (recited) by the bot, "$t" is replaced with the nick of the user that triggered the dequeue, and "$r" is replaced with the nick of a random user that is in the channel. If "$r" appears more than once in a single wisdom, the same nick is used for all occurances. Additionally, "/me" at the start of a wisdom will cause the bot to emote the rest of the wisdom text when it is recited.
Admin
These commands can only be used by admins.quit
Kills the bot.
restart
Kills the bot, then starts it again.
say <text>
Prints <text> to the channel.
me <text>
The bot will emote <text> in the channel.
msg <user> <text>
The bot will send <text> in a private message to <user>.
mode <parameters>
The bot will attempt to set the mode specified. Success depends on the current channel settings and whether the bot has ops or not.