Open Software. Open Knowledge.

Last modified December 08 2008 17:37:43
Eggdrop Jabber Bot
Eggdrop Jabber Bot
Link IRC and Jabber IM together
Jabber Powered!
The Eggdrop Jabber Bot bridges your Eggdrop IRC bot to the Jabber instant messaging network and thus to ICQ (via ICQ transports on the Jabber server). This code is meant to be a demo that it can be done and be useful and to basic start point which you can extent to your needs. The only functionality delivered with this package is right now an invite feature. Let's assume you are a computer science student and have some great news about new gadgets and you want to tell your friends. They are currently not logged in to the IRC server. Write everybuddy a message to come into the IRC channel? Or even worse tell everybody separately about [your favorite new gadget here]? Of course not! So you just tell the bot "!jabot:invite Come and here about THE new gadget" and the bot will message all the users that have set their IM details an invitation with your message... And they can even answer your reply. They can send one message that will be posted to the channel. For more they will have to get to the channel though :-)
The Eggdrop Jabber Bot code is based on older versions of TCL JabberLib and TclXML. The needed versions are included with the package. I have patched them with some additional functionality to fit my needs so porting to the new versions would take some time. Anybody interested?
These are quite hefty as this involves quite a few techniques.
  • Eggdrop
  • A Jabber server, please do not use public servers with this bot (read below why not)
  • The server must have ICQ transport
  • An account on this very server
  • An ICQ account for the bot
  • Optional: Perl with Chatbot::Eliza
Why you should not use public servers
Bots are quite stupid nowadays (ok, at least mine is). As stated for example on amessage bots can become a problem if they try to connect to a transport or service again and again if there is a problem. I have implemented some basic avoidance of such hassle but...
Initial public release.
Some screenshots will give you an impression of the software. By the nature of this script I can only show "collateral" effects...

Administrative DCC Invite and Answers Help and message to admin
Administrative DCC Invite and Answers Help and message to admin
Note: Installing the Eggdrop Jabber Bot is not easy and you need experience with Jabber, Eggdrop and a bit of TCL!
First you have to create a Jabber account and an ICQ account. I assume that you have either setup your own Jabber server or found one that explicitly tolerates bots. I do not deliver a tool for account creation with the package! You will need another client for this. Gaim is a good tool for this. If you have the accounts you have the Jabber ID (JID) and the Unique ICQ Number (UIN). Now you need a Jabber client that is capable of handling Jabber transport agents. Principally this is every client as agents are handled as every other contact. But to make it easier you should use a client that explicitly handles transport agents. Have a look at the Jabber client overview to find one for your system. If you have done so login with the JID you just created for your bot. Add the ICQ transport with the UIN you created before for this bot. Now you should have a client that can add Jabber and ICQ contacts (other nets are not supported in the bot, as we do not need them. If you have the need add another transport and implement the appropriate features in the bot and send me a patch). The bot can detect if the connection to the Jabber server has been lost. To be able to tell when only the ICQ transport went offline you need to add the bots ICQ to his own contact list! If you do not do this your bot will reconnect again and again and will stop to look for network connectivity!
If you want to use the Eliza replies of the bot you have to make sure that Perl 5.6.0 or newer is installed and that the CPAN module Chatbot::Eliza is installed and in one of the dirs in @INC.
Now that all the requirements are met we start with the real setup of the bot. I assume that you already setup your Eggdrop successfully and that the underlying system is some kind of Unix or Linux.
Copy the files in the archive in one directory. Make sure you keep the jabberlib directory intact. Leave the files in this directory! Open jabot.tcl in your favorite Editor. There are two marks. One is "###CONFIGSTART###" and one is "###CONFIGEND###". Everything between these two has to be modified to match your environment. See the comments in the file for a description of the settings.
Now configure Eggdrop to load the script. Add a line like
source /server/irc/eggdrop/scripts/jabber/jabot.tcl
to your config file.
Note: The Eggdrop Jabber bot does work reliable for one channel only. If you need it for multiple channels you have to extend some parts of the code to distinguish between different channels.
If you rehash the Eggdrop now the bot should connect to the Jabber server and start operation.
How to for a user
First you have to get an account on the Eggdrop. Let Fangorn be the name of your bot. Then you would use the following commands (the stuff behind the # is a comment of mine, do NOT type it):
# Introduce yourself to the bot
/msg Fangorn hello
# Get some help...
/msg Fangorn help
# Set your password to "supersecret"
/msg Fangorn pass supersecret
# See what you can set
/msg Fangorn jabot:set
# Set your JID to for notification
/msg Fangorn jabot:set JID
# Send the admin a message. Really only for testing.
# You should not do this if there is no problem...
/msg Fangorn jabot:msgowner Hi, I'm new. Hit me, kick me.
Eggdrop Jabber Bot is released and distributed under the terms of the GNU General Public License (GPL). The included JabberLib (TCL) was written by Kerem Hadimli and revised by Todd Bradley It is released under the LGPL. There exists an updated version of the TCL JabberLib. The needed XML library has disappeared in the form it existed at the time I started the project. But you can get a newer version under the new name TclXML. The old version was released with a proprietary license (only for non-commercial projects free of charge) but the new version is released under a BSD style license. I could not get it to work with the new lib (tried only a couple of minutes), but I guess this should be no problem if you want to have the freer license please port or contact the contact mentioned in the source files about licensing.
By downloading and/or using the software you agree to this license!

You may download the install file provided as a .zip and as a .tar.gz file.
Latest development version is 0.3.

eggjabot 0.3     .tar.gz (44031 Bytes)   .zip (51688 Bytes)
Tools/APIs used

Top 5 Pages
Friends' blogs
SquidGuard Webmin Module

Palm Software
UniMatrix UniMensa UniSorter
UniChat OHS Mobile Onager

My Bookshelf

Valid XHTML 1.1!

RSS Copyright © 2000-2016 by Tim Niemueller