Opera: Free, Fast and Safe Browsing Valid XHTML 1.1! Valid CSS! Work in progres   Work in progress

What is clunker3

clunker3 is an OpBot on IRC, based on IRC::Bot, but completely tailored to my own wishes and preferences.

Aside from being an opbot (OPerator roBOT), which gives or takes operator status to or from people in the chat rooms, it has a wide range of more or less useful commands.

clunker3 recognizes commands in a few different ways:

For the various IRC commands, please see (amongst many other resources) #Beginner - Undernet IRCC Commands, List of Internet Relay Chat commands, IRC Commands, and The IRC Command Cosmos, an advanced guide to IRC commands..

Why clunker3

IRC bots have proven their merit in many public IRC channels, not only to keep the operator status the way the community of the channel would like it to be, but also for the various extra features that were built in.

When, for some reason, an op-bot called clunker suddenly stopped working and did not come back, I wanted to know why it left, and if it would be easy to fix the reason for failure. That is also the reason why clunker3 is called clunker3.

The code for clunker3 is written in perl, and based on the better parts of already existing opbots, like clunker and slavorg. The code has been tailored to blend with IRC::Bot and my own wishes for style, structure and layout.

Apart for regaining the functionality that was lost when clunker left the IRC channels, I found that working on IRC bots is a bit addictive. Many of the current features have been added in the years following the initial re-port. It has proven to be big fun, and a great learning experience.

The command list

Help and status

These commands are available to everyone asking

help
Purpose Show command syntax overview
Syntax help
Example !help
Description A list of the commands that the bot knows about is sent to the requester with the syntax summary at one line per command using /privmsg, so the channel is not flooded.
help will also show a link to this page on the channel.
commands
Purpose Show the command list without syntax description
Syntax commands
Example !commands
Description A list of the commands that the bot knows about is sent to the requester.
Aliases cmds
ping
Purpose See if the bot still responds
Syntax ping
Example !ping
Description Ask the bot for a Pong! answer, just to see if it still replies to quests.
version
Purpose See how long the bot is up
Syntax version
Example !version
Description The bot will reply with it's version and the time it is up and running since the last start or restart.
Aliases uptime
version_all
Purpose Show the versions of all modules that the bot currently uses
Syntax version_all
versions
Example !version_all
!versions
Description
Aliases versions
date [ in Europe/Amsterdam ]
Purpose Show the current date and time (bot's timezone when no timezone specified)
Syntax date
date in Europe/Amsterdam
Example !date
result: Mon 04 Apr 2011 14:45:40 (wk 14)
Description Without extra arguments, show the current date and time on the server where the bot is running, which implies the timezone of the bot.
If a (valid) timezone is passed, it will be used. When the timezone is not known/valid on the server, it will most likely use UTC.
Aliases time, today
nick
Purpose Reset the bot's nick
Syntax nick
Example !nick
Description When network causes re-joins, it can happen that the bot has to choose a different nick/alias than the default clunker3. In order to make the bot feel happy, and show itself the way it is, you can ask it to try to regain its own nick again.
Reference nick

Whereabouts

Only available to those that have operator status

join
Purpose Make the bot join another channel
Syntax join <channel>
Example !join #bot_test
Description
Reference join
part
Purpose Make the bot leave a channel
Syntax part <channel>
Example !part #bot_test
Description
Reference part

The following commands can only be issued by the bot's owner:

reload
Purpose Make the bot reload all possibly updated components
Syntax reload
Example !reload
Description When the source code for the bot, or any of the components used, change, this command makes it possible to make the new code effective without restarting the bot. The bot will thus stay on-line, and keep all the attributes it currently has.
Reference See also version_all and Module::Reload.
restart
Purpose Make the bot restart itself
Syntax restart
Example !restart
Description Restarts the bot.
quit
Purpose Make the bot quit
Syntax quit
Example !quit
Description quit the bot.
Reference quit
Aliases exit, stop

Utilities

These commands are available to everyone asking

calc
Purpose Simple calculator
Syntax calc <expr>
Examples !calc (5*234)/23
result: 50.8695652173913
!calc 5 * 40
result: 0310 / 200 / 0x00c8
Description This command offers a simple calculator, using perl's syntax, where the expression is restricted to digits, hexadecimal numbers, parens, spaces, and the operators +, -, *, and /.
If the syntax was found valid and supported, the answer will be given as a decimal result. If the result is an integer, the result will be shown in octal, decimal, and hexadecimal.
tran
Purpose Translate text
Syntax tran <fr>:<to> <text>
tran help
tran version
tran prefer YB|GT
tran list [<lang>]
Examples !tran en:nl fine
en:nl GT - prima
en:nl YB - boete
Description This command uses Yahoo::Babelfish, for which the result is prefixed with YB, and Google::Translate, for which the result is prefixed with GT, to try to translate the given text from <fr> language to <to> language. If the result from both translators is identical, only one result, with no prefix, is shown.
The supported languages can be asked for with the list command to tran.
Languages are passed using the standard two-letter language code as layed out in the ISO-639-1 standard.
Aliases tr, tra, trans
dict
Purpose Find the dictinary entries for a word
Syntax dict [<lang>:]<word>
dict help
dict sites
Examples !dict dictionary
dictionary (noun pl. -·ar?·ies)
  1. a book of alphabetically listed words in a language, with definitions, etymologies, pronunciations, and other information; lexicon
  2. a book of alphabetically listed words in a language with their equivalents in another language a Spanish-English dictionary
  3. any alphabetically arranged list of words or articles relating to a special subject a medical dictionary
Description This command uses a public web dictionary to look up the definitions for a given word and presents the result. If the relust is longer than 3 lines, it will be returned as private messages.
Currently just supports en (English) and nl (Dutch), but future extensions might add support for dictionaries in other languages like ge (German) and fr (French).
Languages are passed using the standard two-letter language code as layed out in the ISO-639-1 standard.
uchar
Purpose Unicode utilities
Syntax uchar help | sites | faq | advice | tutorial | unicode
uchar [-v[<level>]] <text>
Examples !uchar U+20AC
€ U20ac \N{EURO SIGN} (Sc, Common, EURO SIGN, Currency Symbols)
!uchar űçħåř
ű U0171 \N{LATIN SMALL LETTER U WITH DOUBLE ACUTE} ç U00e7 \N{LATIN SMALL LETTER C WITH CEDILLA} ħ U0127 \N{LATIN SMALL LETTER H WITH STROKE} å U00e5 \N{LATIN SMALL LETTER A WITH RING ABOVE} ř U0159 \N{LATIN SMALL LETTER R WITH CARON}
Description Provide some basic Unicode analysis tools. The entered text will recognize UTF-8, and code notations like U+20AC, U20AC, \x{20ac}, and \N{EURO SIGN}.
If only one single character is inquired, some properties will also be shown.
utf8
Purpose Show UTF-8 encoded test line
Syntax utf8
Examples !utf8
Đíť ìš éèñ ëņċøďıńğŧęŝţ·
Description Display a UTF-8 encoded test line to see if the IRC client can deal with Unicode.
iso8859-1
Purpose Show ISO-8859-1 encoded test line
Syntax iso8859-1
Examples !iso8859-1
Đít; ìs éèñ ëncødingtest·
Description Display a ISO-8859-1 encoded test line to see if the IRC client can deal with Latin1.
Aliases latin1
hex
Purpose Give hex-dump of text
Syntax hex <text>
Examples !hex űçħåř
c5 b1 c3 a7 c4 a7 c3 a5 c5 99
Description Give a hex dump of the text as encoded.

Web Access

These commands are available to everyone asking

shorten
Purpose Give a short URL for a long URL
Syntax shorten <url>
Examples !shorten http://www.nu.nl/news/1689383/50/Peperdure_iPhone-toepassing_doet_niets.html
http://tinyurl.com/68x7zj
Description As per tinyurl.com's description: Making long URLs usable. For the requested URL a tiny URL will be created that will not break in email postings and never expires.
google
Purpose Return the first hit from a Google search
Syntax google <query>
Examples !google wii.fit+jump
[ http://tinyurl.com/6nkmqp | /url?q=http://www.youtube.com/watch%3Fv%3Dh8q6yk7aO9U&sa=X&oi=video_result&resnum=1&ct=thumbnail&usg=AFQjCNFhwR8IWRcgCADHNod-Gnza-pO4xQ ] <img src=http://img.youtube.com/vi/h8q6yk7aO9U/2.jpg width=80 height=60 border=1 alt="">
Description Return the first hit (if any) of the hits that Google returns for the query.
Aliases search
acronym
Purpose Return the first hit from a acronym search
Syntax acronym <acronym>
Examples !acronym gmta
[ http://tinyurl.com/pk2j9p | http://www.acronymfinder.com/Great-Minds-Think-Alike-(GMTA).html ] Great Minds Think Alike
Description Return the first hit (if any) of the hits that acronymfinder returns for the query.
If that query fails, netlingo is tried.
Aliases acro

cents

cents  [in <CUR>]      Show exchange rates. '!cents 2 USD to EUR' allowed

convert 1000 EUR to USD

change 1000 EUR to USD

pennies, currency, currencies, euro, dollar

cents help

cents sites

Perl

These commands are available to everyone asking

smoker

smoker    <query>      Query the Smoquel database (perl5 core smokes)

change

change   <change>      Show perlbrowse's entry for perl5 change number

rt

rt       <change>      Show RT's entry for perl RT entry

bug, rt, p5p, changes?, perl

cpan

cpan     <module>      Show basic CPAN info for module

corelist

corelist <module>      Show as of when a CPAN module is shipped with perl

p3rl

p3rl     <request>     Show the related URL from http://p3rl.org

ITRC

These commands are only available in the #itrc channel.

stat

Access control

Only available to those that have operator status

ban
Purpose Deny access to channel to someone
Syntax ban <nick>
Example !ban sexyslave123
Description This command is equal to /mode +b nick
This commands kicks a user from the channel, and remembers that. When the same someone enters again, the bot will kick again.
Reference Channel modes
unban
Purpose Revoke access denial to channel for someone
Syntax unban <nick>
Example !unban bozo
Description This command is equal to /mode -b nick
This command will remove the ban from someone.
trust
Purpose Give someone operator status
Syntax trust <nick>
Example !trust slavorg
Description trusting nicks will give operator status to nick, but only if the bot itself has operator status and the nick that requests this trust is trusted by the bot.
This command is equal to /mode +o nick
The bot will remember who got this status, and will try to give the status again when that nick re-joins. The memory will use normalized nick names, stripped from leading and trailing underscores and converted to all lower-case letters
Reference Channel modes
untrust
Purpose Take away operator status from someone
Syntax untrust <nick>
Example !untrust villain
Description untrusting nicks will take operator status from nick, but only if the bot itself has operator status and the nick that requests this trust is trusted by the bot.
This command is equal to /mode -o nick
The bot will remember who got this status, and will try to take the status away again when appropriate. The memory will use normalized nick names, stripped from leading and trailing underscores and converted to all lower-case letters
believe
Purpose Voice someone
Syntax believe <nick>
Example !believe dipsy
Description This command is equal to /mode +v nick
The bot will remember who got this status, and will try to give the status again when that nick re-joins. The memory will use normalized nick names, stripped from leading and trailing underscores and converted to all lower-case letters
Reference Channel modes
unbelieve
Purpose Take someones voice
Syntax unbelieve <nick>
Example !unbelieve drunken_sod
Description This command is equal to /mode -v nick
Reference Channel modes
names
Purpose Re-apply ban, trust, and believe rules from memory
Syntax names
Example !names
Description Check if all remembered rules are honored. This is useful when the bot was restarted or did re-join and just got operator status from another channel operator. Instead of the channel operator, the bot can then apply the /mode commands from it's internal storage.
relations
Purpose Show the list of nicks trusted and believed
Syntax relations
Example !relations
Description Show the list of nicks the bot has stored to trust or believe in\ the current channel.

History and Miscellaneous

These commands are available to everyone asking

seen
Purpose Show when and where someone last spoke
Syntax seen <nick>
Example !seen dipsy
Description The bot tries to remember the last message spoken by someone for each channel the bot has joined. If you are looking for someone, for and you know that person has been on any of the IRC channels where the bot is present, asking seen questions will show you where and when that person was seen and what was said.
seen will also be triggered when the exclamation mark is omitted, but it can have been told to keep silent when other bots in a channel also reply to seen.
summon
Purpose Draw someone's attention
Syntax summon <nick> [<message>]
Example !summon dipsy
Description The original thought about /summon was to be able to asks somebody connected to a host system with IRC to join you on IRC, where you should use the person's entire e-mail address.
Aside from the fact that many people would not like their e-mail to show up on IRC, this turned out to be a bad idea, and many bots now implemented an alternative, assuming the person is already on IRC in the current channel.
summon will rely on the alerting capabilities of the IRC client the user uses and just outputs the name of the summoned person in random capitalization.
See also seen.
greet
Purpose Greetings
Syntax greet help
greet [<target>] [in <lang>]
gm    [<target>] [in <lang>]
ga    [<target>] [in <lang>]
ge    [<target>] [in <lang>]
gn    [<target>] [in <lang>]
Example !greet all in no
Description greet will show a generic greeting in the selected language, or in all known languages if none is selected, based on the time of day (where clunker runs).
greet can be forced to the time of day required by one of the four aliases: gm for "good morning", ga for "good afternoon", ge for "good evening", and gn for "good night".
Currently supported languages are nl, en, de, fr, es, pt, no, ro, el, pl, fi, eo, it, and ja.
Aliases gr, gm, ga, ge, gn,
paste
Purpose Show the best known paste site URLs
Syntax paste
Example !paste
Description
Aliases pasty, pasty, pasta, nopaste, nopasty, nopasta,