Skip to main content.

Using IM Bots for Jabber

By Tony Cheung, Chatopus

Oct 20, 2004 (Last updated: June 25, 2005)

Introduction

An IM bot (roBOT) is an interactive agent that uses instant messaging (IM) as an application interface. IM user can add the name of an IM bot to their buddy list and interact with them as if they are talking to a real person. IM bots provide many convenience functions for IM users, including news, weather reports and dictionary. They are especially useful for mobile users, because they require much lower bandwidth comparing to a graphical web interface.

Many IM bots are available on the public Jabber network. We have already discussed JabRSS, an IM bot that provides real-time RSS news feeds. In this article, we are going to show you some more.

Dictionary Bot

First, we would like to show you a dictionary bot. To add a dictionary to your Jabber client, add dict2@openaether.org to your buddy list. Then simply send a word to that contact and it would reply you with the word's definition from multiple dictionaries.

This is a good example of an IM bot that looks up a database. The bot actually connects to a dictd (dictionary) server and requests information on words for you. Some Jabber clients, such as Chatopus, provide IM history. Thus, you can easily go back to the message history and read through previous word definitions. This is a good way to learn new vocabularies and memorize them.

Step-by-step Guide for Chatopus

The following shows you how to use this dictionary bot using Chatopus,

  1. Log in your Jabber server, then choose "Tools->Add Contact" and enter "dict2@openaether.org".
  2. Optionally, enter a nickname for this dictionary bot and assign it to one group. Click "OK".

  3. You would receive an authorization request from the bot to see your presence. You need to accept the authorization request.
  4. You are now ready to use the dictionary bot! Simply send a word to it and the definition will arrive as a new message.

Chat Bot

Some IM bots use artificial intelligence (AI) to interact with IM users. If you wish to get some fun or simply want to show off your Jabber client to your friends, chat with this psychotherapist, eliza@swissjabber.org.

This IM bot is a faithful implementation of the original Eliza program. Eliza is a very famous computer program, which emulates a non-directive psychotherapist. The original Eliza was written by Professor Joseph Weizenbaum of MIT and described in the Communications of the ACM in 1967 (Vol. 10, No. 8). Eliza accepts text input from a user, and then performs syntactic pattern patching to come up with a response, usually a follow-up question to stimulate users' interests. This makes certain kinds of natural language conversation between man and computer possible.

Weather Bot

IM provides a good interface for delivery of real-time information. Using a Jabber cliet, you can get real-time push of weather updates for any major city.

A good weather bot is provided at jabber.zim.net.au. To use the service, you would need to perform a service registration with weather.jabber.zim.net.au. After that, you would need to add <city code>@weather.jabber.zim.net.au to obtain real-time weather updates for that city. The real-time weather information is reflected in the detail online status of that contact.

The following are some examples of city codes and their corresponding JIDs,

City City Codes JID
Beijing chxx0008 chxx0008@weather.jabber.zim.net.au
New York City usny0996 usny0996@weather.jabber.zim.net.au
San Francisco usca0987 usca0987@weather.jabber.zim.net.au
Vancouver caxx0518 caxx0518@weather.jabber.zim.net.au
Hong Kong chxx0049 chxx0049@weather.jabber.zim.net.au

Looking up the City Code

If you want to look up a city code of your local city, simply go to weather.yahoo.com. Enter the city name in the search box. After you get the weather page of the city, you can look at the URL of the page to find out its city code. For example, the weather page for the city, Hong Kong, is http://weather.yahoo.com/forecast/CHXX0049.html. Thus, the city code is chxx0049 and you can add chxx0049@weather.jabber.zim.net.au.

Step-by-step Guide for Chatopus

The following step-by-step guide serves as an example on how to use this weather bot. It requires Chatopus v1.61 or later.

  1. Log in your Jabber server, then choose "Tools->Register with a Service" and enter "weather.jabber.zim.net.au".
  2. If the registration request is successful, you would see the following form.
  3. Click "Register".

  4. You would receive an authorization request from the service to see your presence. You need to accept the authorization request.
  5. Click "Accept".

  6. Next, add <CITY CODE>@weather.jabber.zim.net to get weather update for your city.
  7. You would then see the contact you just added online. Choose "Info" and then click on the contact to see its detail online status.

Conclusion

So, we have shown you several IM bots that provide something fun and useful for everyday's use. If you have discovered some other cool IM bots, feel free to drop us a line at support@chatopus.com.

Happy Jabbering!