Bobot++ - an IRC bot
First, if you don't know what is a bot or if you don't know what is IRC, you're at the wrong place, sorry :-)
The bobot was a powerful bot, but it was limited to an unique channel, and an unique bot per process. The bobot++ is designed to support as many channels as you want (in the limit of 20 channels, but this limit is set by the servers). Moreover, it will support multithreading easily (all the objects are thread-safe).
Here is a non comprehensive list of the bobot++'s features:
Downloading the bobot++
You can get the latest version of the bobot++ from this site only. Here is the current version:
Note that revision numbers 1.1 and 1.3 were development versions only.
Changes since version 1.2:
Compiling the bobot++
Compiling the bobot++ is rather simple. You will only need an Un*x-like system and a C++ compiler supporting the Standard Template Library (STL).
The bobot++ compiles fine under the following operating systems:
It should compile easily on many other POSIX compliant systems.
First, you will have to edit the Makefile if your C++ compiler is not g++. Change the line:
With some Un*ces, you will have to link the program with some extra libraries. Change the line:
For example, you will need this line with Solaris:
Then you should be ready to compile the program. Type make at the prompt. If you get an error, please try and fix it before emailing me...
Now, you should have a executable file named bobot++ in the directory. This is it! We will have to configure the bot, now...
Configuring the bobot++
Edit the example file bot.conf to suit your needs. The comments in the file should be self explanatory...
Here is an example:
nick = Bobot username = bot cmdchar = ! userlist = bot.users logfile = log server = irc.eurecom.fr server = irc.emn.fr server = irc.enst.fr server = salambo.enserb.u-bordeaux.fr channel = #test1 channel = #test2 key
The bot will be named Bobot, more precisely Bobotemail@example.com. Its command char will be '!'. It will find its user list in the file bot.users, and it will have three servers in its server list. The log will be written to the file log. It will join two channels: #test1 and #test2 with key as the channel key (remember, the +k mode for channels...).
If you omit one of these configuration options, a default value will be used.
Comments begin with ``#'' (at the first column only), and here is the meaning of all configuration options. Note that there are synonyms.
You are the master of the bot
Yes! But the bot does not know who you are yet. Edit the file bot.users (or whatever your userlist file is) and put in a line like this one:
where <your adress> is composed with your IRC address. It should be something like that:
if you connect on IRC from machine.domaine.com, with username as login.
For me, this is *!*bernard@*.cma.fr.
Now, you can run the bot:
Note that there are certain command line options that you can see with:
Using the bobot++
Adding people on the userlist
Of course, you will want to add people on the userlist, as well as other bots. The adduser command is for you, then! Its syntax is:
!adduser <nick>|<mask> <channel mask> <level> <prot> <aop>
Note that ``!'' is the command char of the bot, and it may be
different according to the configuration you chose.
Here are two examples:
!adduser eb #* 2 1 0 !adduser *!*firstname.lastname@example.org.*.* #test 0 3 1 !save
We first add ``eb'' (me!) to the userlist, for every non-local channel, at level 2 (trusted user), with no-ban protection and no auto-op.
Then we add every user matching ``*!*email@example.com.*.*'' to the userlist for channel ``#test'', with level 0 (no level), protection 3 (no-deop) and auto-op on join. It is probably another bot.
Finally, we save the changes to the userlist. Note that this is not mandatory, since the userlist is saved when the bot !dies, but if the bot is killed or if there is a bug (yes, there are bugs :-), all your changes would not have been saved.
Issuing a command (like for example a kick)
The bobot++ supports two types of commands: those who affect a channel (kick, ban, topic...) and those who don't.
For commands which need a channel name, the channel name can be optionnaly put after the name of the command. This is mandatory if the command is made directly to the bot, with a private message.
Suppose the bot is on two channels, #test1 and #test2. You are on channel #test1. Here is the behavior of the bot:
Is this clear enough? This is rather compelling, I know, but I have not found a better way to do this.
Spying the bot
I hate people that kick others via the bots, and using a private message to the bot. There is no good way to really know what others do. Furthermore, some private messages can be sent to the bot and this can be funny. That is why I made a command to spy bot's private messages.
There is a ``spylist'' on the bot that every user can read with the command !spylist. To be added to the spylist, you should use the !spymessage command. To be removed, this is the !rspymessage command.
Note that password control on the bot is not yet implemented, so there is no danger of knowing the password of other people. I will improve the spylist later in order not to be able to see others' password.
Intelligent ban and deban
Note what happens if you try:
!ban *.a.a !ban *.b.a !ban *.c.a !ban *.d.a
Fine, isn't it? If we didn't do that, the server would not accept the last ban. Try also !deban * (use it when the banlist is full!).
Getting help on other commands
The !help command without arguments will give you all the commands you can issue. For a master, this will give you (this may change in the future):
-Bobot- Available topics for you are: -Bobot- ACTION ADDUSER ADDSERVER BAN CHANNELS CYCLE DEBAN DELSERVER DEOP DIE HELP INVITE JOIN KICK KICKBAN LOCK NAMES NEXTSERVER NICK NSLOOKUP OP PART RECONNECT RSPYMESSAGE SAVE SAY SERVER SERVERLIST SPYLIST SPYMESSAGE TOPIC UNLOCK USERLIST WHO WHOIS -Bobot- Use HELP <command> for help about <command>
If you want help about the !kick command, use !help kick:
-Bobot- Help for KICK: -Bobot- KICK [<channel>] <mask>|<nick> [<reason>] -Bobot- Kicks <mask> or <nick> out of <channel>, because of <reason>. -Bobot- You need to be a trusted user to use a <mask>. -Bobot- End of help.
Then you have the tools to explore the bobot++ in details. Good luck!
Bugs, questions, etc.
If you find a bug or a strange behaviour of the bot, please try to reproduce it, and then send me a mail describing the problem in details.
If you have suggestions about new features, please tell me. If you added features yourself, send me your patch!
Note that I will not answer to configuration or compilation problems...
Plans for the future
Here is what I plan to add to the bobot++:
Why use Guile?
Guile is the GNU Scheme interpreter. In a future release of the bobot++, I plan to add scripting support using this interpreter.
So, why did I chose Guile, instead of Tcl or Python?
One of the main features of Guile is that it will be easy to extend the interpreter in order to translate Python, Tcl or Perl to Scheme code. So, you will have the choice of the language! If you prefer Python instead of Perl or Tcl, use Python. If you prefer CTax (a language similar to C), all right! I hope that religious wars opposing those languages will soon be over...
Moreover, as Guile is GNU code, it is really a free software, and will keep this status.
Finally, it is an excellent product, so why shouldn't we use it?
Etienne BERNARD Last modified: Sat Mar 21 13:32:54 CET 1998