Main

Getting started
  Installation
  Configuration
  Starting the bot
JavaBot:Manual:Getting started

Installation
Before doing anything else, you have to make sure you have all the requirements installed.
The requirements are:


To install, just unpack the archive to a directory of your choice. If you are uncertain about how to use your unpacking tool, use Google :)

If you feel that you don't need to re-compile the source code (it's already compiled for your convenience), just move on the configuration. All you others, follow me.

The compilation looks a bit different depending on what platform you use, and if you have Ant installed or not.
The first thing you need to do, is to put yourself in the JavaBot-directory. When that's done, there are three different commands you can use (don't use all three.. it's unnecessary):
ant compile
./compile.sh
compile.bat

If none of these commands work for you, maybe you're on an unsupported platform. Take a look at either compile.sh or compile.bat and execute the commands listed according to your platform requirements. We would also appreciate if you could mail us what platform you had problems with, and we will try to fix it.

Congratulations, you now have a bunch of fresh class-files.

Configuration
When starting the bot for the first time, you will be presented with the configuration wizard (from 0.3.4 and up). It will ask you a few questions, and then create the config file according to your needs.
A sample config file could look like this:
<?xml version="1.0" encoding="UTF-8"?>
<javabot>
  <sendexception>yes</sendexception>
  <adminemail>you@example.com</adminemail>
  <botinstance>
    <nick>JavaBot</nick>
    <networkname>Quakenet</networkname>
    <sendingsleeptime>1750</sendingsleeptime>
    <fileprefix>quakenet</fileprefix>
    <rejoinwhenkicked>yes</rejoinwhenkicked>
    <floodprotect-messagelimit>6</floodprotect-messagelimit>
    <floodprotect-timelimit>5000</floodprotect-timelimit>
    <channel>
      <name>#eql</name>
      <key/>
    </channel>
    <channel>
      <name>#microsoft</name>
      <key>ThisIsAChannelKey<key>
    </channel>
    <server>
      <hostname>irc.quakenet.org</hostname>
      <port>6667</port>
    &t;/server>
    <server>
      <hostname>irc.se.quakenet.org</hostname>
      <port>6667</port>
    </server>
  </botinstance>
</javabot>

sendexception - Set this to yes if you want the bot to send bug reports to the bug tracker on SourceForge each time something unexpected happens, much likely a bug. Set to no to not send bug reports
adminemail - This should be the bot administrators e-mail. It is used in the bug reports mentioned above, and in the uptime competition.
botinstance - You can have several bots running by creating several botinstance entries in the config file
nick - The bot's nick
networkname - The name of the IRC network the bot will connect to
sendingsleeptime - The amount of time (in milliseconds) to sleep between sending messages. If you have this too low, the bot might disconnect from the IRC-network because of excess flood
fileprefix - The prefix to add to server-specific files, or more exactly bot-specific files, such as users.
rejoinwhenkicked - Set this to yes if you want the bot to rejoin when kicked, no otherwise. floodprotect-messagelimit - The amount of messages a user should be able to send in...
floodprotect-timelimit - ...a certain timeframe. Setting message limit to 6 and time limit to 5000 would kick the user that writes more than 6 messages in 5 seconds
channel - The name and optional key of a channel the bot should join on connect
server - A server with port that the bot should connect to on start up. If the first doesn't work, it will try with the next one and so on

Starting the bot (for the first time)
Now that you have configured the bot properly, it's time to start it. To start the bot, place yourself in the classes-directory, and then there are two different commands to choose between:
java JavaBot
ant start
There are also a few flags that can be used, for a complete list of these, use
java JavaBot --help

There are some variations you can use to get it to run as a daemon. These are:
java JavaBot & - On Unix/Linux and compatible
javaw JavaBot - On Win32-systems
Once we find information about how to put in into the code, we will do so. In the meantime, you'll have to put up with this.

If all goes well, you should see the bot join the channels you specified in a few seconds. If it hasn't joined for one minute, use the --debug flag to determine what's wrong, and check the classes-directory for error logs.

Now that you have your own IRC-bot running, it's time to get to know it. Or more specific, to get it to know you. To do this, use the command Hello, like this:
-> *JavaBot* Hello
-JavaBot- User created

Now you have a user named after your IRC-nick with a password generated by the bot (and shown to you). To log in with this user, use the command LogIn, for example:
-> *JavaBot* LogIn CreoN password-shown-in-manual
-JavaBot- Logged in. To make sure that no one can abuse your account, please use logoff before disconnecting.

What you want to do now is up to you. A good place to start is to use the Help-command, to get a feeling of what the bot can do for you and your channel.

Have fun with your IRC-bot, and if you experience any problems, don't hesitate to contact us!

Support This Project
SourceForge.net Logo