Javabot
How do I use the javabot?
- Ask it how in a private message: /msg javabot help
- A quick primer is included in this FAQ, but it is not meant to be a complete tutorial. You should observe how the channel regulars use javabot, and learn from that.
Where can I find javabot's web interface?
- Factoids
- Karma Rankings
- ChangeLog
- For channel logs for just choose the channel from the list on the left-hand side.
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
There is also a special offer: with 200 karma points and $5.95 in your hand, you can walk into any Burger King franchise in the United States and get a hamburger and a Coke.
DO NOT ABUSE KARMA!!!
How do i increment or decrement somebody's karma?
- To increment somebody's karma do
~nick++ - To decrement somebody's karma to do
~nick--
Note: Incrementing your own karma will cause you to *LOSE* one (1) 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, that is increment or decrement it in a private message to javabot. This is one of the new nifty features added recently.
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 basically means choose from the following at random. [The tilde is assuming you triggered it from within the channel.]
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 the factoid 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 do an action.
The syntax is: ~foo is <reply>bar and ~foo is <action>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.
Now, you can also have a factoid take an argument, the syntax 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.
One other token may be of interest to you, that is 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 you'd like to retrieve metadata (who added it, when it was added, etc.) for.
How do I use the javadoc command in javabot?
The ~javadoc command can only retrieve Java SE javadoc pages, not Java EE.
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. Such is true for List. There is
java.util.Listandjava.awt.List. 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 four ways, please do not include the quotes, they are not needed. They are included to illustrate that a space is required when addressing javabot using its nick.
- use the tilde ~
Example: ~javadoc String.split(*)
- "javabot "
Example: javabot javadoc String.split(*)
- "javabot, "
Example: javabot, javadoc String.split(*)
- "javabot: "
Example: javabot: javadoc String.split(*)
What is the default database used by javabot?
The default database is HSQLDB. For a few reasons, it's easy for those who are curious, since no setup is required. Another is it's compact. A whole multitude of reasons, but mostly because it's just easy to use. There is no need to download HSQLDB since it is downloaded when you run ant.
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. Awesome framework. There are many others, but javabot uses this.
Can you put javabot in my channel?
No, but you can download the source and put your own bot there. Just type 'source' in a private message to javabot. No single quotes.