≡ Menu

Using Javabot

How do I use the javabot?

  • Ask it how in a private message: /msg javabot help
  • This is a quick primer, and is not meant to be a complete tutorial. You should observe how the channel regulars use javabot, and learn from that.
  • All commands are assumed to be executed from the channel. If done in private message, the tilde is unnecessary and invalid.
  • If your NickServ account is new, javabot may refuse to interact with you; ask someone who’s been around to show you what you need. Your NickServ account needs to have been registered for at least fourteen days (in javabot’s default configuration).

Where can I find javabot’s web interface?

What is karma?

Karma is a rough measure of your peers’ respect toward you in matters related to the ##java channel. It’s common for residents to assign you karma points for:

  • helping with a tough problem without spoonfeeding
  • saying something funny
  • providing a service to the ##java community
  • otherwise being someone that others respect, like, etc. in ##java

How do I increment or decrement somebody’s karma?

  • To increment somebody’s karma, enter ~nick++
  • To decrement somebody’s karma to do ~nick--
    Note: Incrementing your own karma will cause you to lose one karma point. This is not a bug, so don’t bother reporting it. It is intended to discourage karma whoring. Karma whoring is defined as trying to increment your own karma to make you look like you have more respect than you actually do.
  • One thing of interest is that you cannot modify karma in a private message to javabot.

If you still try to whore your own karma by, well, working around the bot, the human ops will know and respond – often by decrementing your karma by quite a bit. It’s just an informal gauge; it’s not worth your trouble.

Why does ~pastebin output a different pastebin sometimes?

~literal pastebin outputs the following: <reply>(http://papernapkin.org/pastebin|http://eugeneciurana.com/pastebin|http://rifers.org/paste|http://pastebin.stonekeep.com), which is how javabot chooses one entry from a set of possible answers.

How do I add factoids?

A couple things to note:

  • Please only add factoids that are useful.
  • Think twice before adding a factoid or saying something that is rude, offensive, or just generally useless. Be considerate of others, especially the ops.
  • To add a factoid the syntax is: ~foo is whatever, this would would make ~foo output foo is whatever. Replace foo with the name of the factoid you want to add.

Now, there are special tags that can be used:

  • <reply> makes the factoid trigger a reply from javabot, the reply is whatever is after the <reply> tag.
  • <action> makes the bot issue an IRC action.

The syntax is: ~foo is <reply>bar and ~foo is <action&t;jumps up and down, replace foo with the name of the factoid you’d like to add.

DO NOT put a space between the text and <reply> and <action>. The syntax is exactly as it is given.

If you would like the factoid to take an argument, an example is ~greet $1 is <reply>Hello $1.; you’d trigger that factoid by typing ~greet argument, where argument is the argument you need passed to the bot. That will output Hello argument.

You can also use $^, which camel-cases the input (removing all spaces). For example: ~foo $^ is <reply>$^. The reply will be the input passed to ~foo, camel-cased with all spaces removed. So, for example:

~foo This is a test will output: ThisIsATest

Lastly, the $+ token will URL encode the input so it can cleanly be passed as a GET parameter to a url such as google, etc. Usage is similar to the $^ and $1 tokens. For more information see the javadoc for URLEncoder.encode(String).

As an Example:
~foo $+ is <reply>http://www.google.com/search?q=$+

One other token may be of interest to you: the $who token. That is the person who retrieved the factoid, or the person whom the ~tell was directed towards.

How do I redirect a factoid to an existing one?

To do that you use the <see> tag. Please keep in mind that you SHOULD NOT put a space between <see> and the factoid you are redirecting to.

Example: foo is <see>bar

How do I get information about who added a factoid?

Do ~info rbi replacing “rbi” with the name of the factoid for which you’d like to retrieve metadata (who added it, when it was added, et cetera).

How do I use the javadoc command in javabot?

For the time-being this command is case-sensitive, so string is NOT the same as String.

To get the javadoc page for a specific class, just do ~javadoc String.

To get the method inside a class of a javadoc page do ~javadoc String.split(*), you can replace the asterisk with the type parameter, such as ~javadoc String.split(String), String.split() takes a String as a parameter.

There may be cases where the same class name exists in different packages; for example List exists in both java.awt and java.util. You may need to actually specify which you want so do, ~javadoc java.util.List, this is most likely the one you will want, otherwise when you do ~javadoc List, both will come up.

How do I tell another user about one of the factoids or a javadoc

There are two ways:
* ~tell user about rbi (replace rbi with the name of the factoid you’d like to give them)
* ~~user rbi (again, replace the name of the factoid) — this is the preferred way now.

You DO NOT need to use ~tell or the new form when telling yourself about a factoid; simply just do ~rbi.

Can I private message javabot?

Yes, in fact if you’re going to repeatedly use javabot, we recommend it. In private message, no tilde or ~ is needed. The tilde is intended to keep javabot from repeatedly responded to all of the messages in the channel.

How do I address javabot?

There are a few ways.

  • You can use the signal character (the tilde, or ~): ~javadoc String.split(*)
  • You can address the bot by nick: javabot: javadoc String.split(*)
  • You can issue a private message to the bot.

Where can I get Javabot’s source?

You can get Javabot’s source code from github.

Who wrote javabot?

Well, ricky_clarkson originally wrote it. Since then, cheeser, joed and kinabalu have been the main developers maintaining and adding nifty new features to javabot.

What framework does javabot use?

Javabot uses PircBot for its backend.

Can you put javabot in my channel?

If your channel is on freenode, then it’s a possibility. Ask and see. Alternatively, you can build the source and run your own bot. You can find the source at the project page.