Bot
For those who don’t know, the Linux Journal crew inhabit an IRC channel on the freenode network (#linuxjournal on irc.freenode.net). I have a web portal available right here on the Underblog for anyone who wants to come and visit but isn’t familiar with IRC.
As part of the channel fun, I’ve set up a channel bot — JustinBot — that performs a mix of useful and entertaining tasks. Below is a list of commands that can be issued by any user in the channel; remember that all commands begin with !.
To help avoid channel disruptions, if it doesn’t involve others in the channel, please send your command to the bot by private message — /msg JustinBot [command] — and it will respond back the same way. When a response is truncated, the !more command will continue the output; whenever possible, use the !rest command instead, which will send the results just to you by private message.
You can issue the !options command in the channel to get a list of commands from the bot; to avoid flooding, the list will be sent by private message. Note: The list is rather long.
0-9
!8b — Get an answer to a question from the Magic Eight Ball.
A
!active — Show what users are currently active.
!active [minutes] — Show what users have been active in the specified number of minutes.
!alarm [time] [message] — Sends the user who requested the alarm a private message containing the requested text at the specified time. May be input as a time only (in 24-hour format) to message at that time on the same day, as a [mm-dd-yyyy] [hh:mm] format to message on that date at that time, or as a number of seconds in the format [+seconds].
B
!beer — Ask the bot for a beer. Related: !cocktail, !shot, !coffee, & !tea.
!buzz — Returns a random, possibly nonsensical, marketing buzz phrase.
C
!calc [math problem] — Performs simple calculations. Use !rpn for the value of an RPN expression.
!cocktail — Ask the bot for a cocktail; also !drink. Related: !beer, !shot, !coffee, & !tea.
!coffee — Ask the bot for a cup of coffee. Related: !beer, !cocktail, !shot, & !tea.
!choice [list separated with spaces] — Make a random selection from the given list.
!convert [number] [known unit] [desired unit] — Convert the given quantity from one unit to another. Units should be spelled out for best results.
!country [country code] — Show which country is represented by the given country code.
!cupcake - Delivers one of a variety of cupcakes.
D
!dig [host] [query type] — Run dig on a hostname. Specify the query type (A, AAAA, CNAME, etc.) after the host. For more information on query types, see this list or ask in the channel.
!dns [ip/host] — Run a DNS query on the specified host. Also !hexip, !host, and !ip.
!drinks - Shows the various drink related commands.
F
!fire — Delivers random fire-related comments for those times when killing with fire is a necessity.
H
!hexip [ip/hex] — Translate the specified IP (no hostnames) into hex, or the specified hex into an IP and a hostname, if there is one.
!host [IP] — Return the hostname associated with the given IP, if one exists.
I
!idle — Show how long the channel has been idle.
!idle [nick] — Show how long the specified nick has been idle.
!imdb [film] — Returns an IMDB link for the film name given.
!insult — Deliver a random Shakespearian insult.
!ip [host] — Return the IP address of the given hostmask.
L
!lag — Reports the current server lag.
M
!mono — See if you’ve slipped into a monologue.
!mono [nick] — See if the specified nick has crossed into a monologue.
!more — Show additional responses, if the bot indicated more were available - it will show (+#) at the end of the response if so. Do not use for more than one additional set, or if the response isn’t of general interest in the channel; use !rest instead, which will message you the remainder.
O
!oneliner — Deliver a random one-liner
P
!pizza - Delivers a random pizza.
Q
!quote — Deliver a random quote from the channel.
!quote-count — Show a count of the number of available quotes.
!quote-last — Show the last quote.
!quote-search [string] — Search the quote list for the specified string.
R
!response — The bot will request a statement, and will repeat it back.
!rest — Have the bot private message you the remainder of the responses to a query. Additional responses are shown by (+#) at the end of the first response. Use this command instead of !more in most instances.
!reverse [text] — Reverse the given text.
S
!shot - Orders one of a variety of shots.
!snack - Delivers one of various snacks.
!snacks - Shows a list of the snack-related commands.
!spell [string] — Check the spelling of the string provided; if incorrect, will suggest possible spellings.
T
!tea — Ask the bot for a cup of tea. Related: !beer, !cocktail, !shot, & !coffee.
!time — Show the current time. (US Eastern)
!tinyurl [url] — Returns a tinyurl and a preview url for the supplied url.
!translate [from lang.] [to lang.] [text] — Translate the given text from the specified language to the specified language. Also !tr.
U
!uptime — Show the length of time since the bot was last restarted.
W
!wikipedia [text] — Search Wikipedia for the specified text. Also !wiki.
!wikipedia [-language code] [text] — Search the Wikipedia in the specified language for the specified text. Be sure to include the - before the language code.
Y
!yahoo [string] — Search Yahoo for the specified string. Will return links for the first five results.
Questions/Comments/Problems
If you have questions or comments about the bot, please feel free to drop me an email via the contact form, or find me in the channel — I’m in most evenings from around 8:00PM until about 5:00AM (Eastern). If the bot is malfunctioning, or there is another serious problem with it, the !sos command can be used to contact all online bot operators. Please don’t use this command unless there is a real emergency.


