Hack 99 Use MSN/ICQ/Jabber from IRC


some people prefer to stick with other instant messenger networks
like ICQ or MSN. Get in touch with these people.You don't have to install a separate program for
chatting with your friends
on ICQ, AIM, or MSN any more. A program called BitlBee
allows you to talk to all these people through your IRC client.
Fortunately, using this program is a lot easier than spelling its
name correctly.BitlBee simulates an IRC server that
has just one channel. All of your buddies will join the channel so
you can talk to them. You can install BitlBee on your own machine,
but if you don't want to or if you just
can't, you can also use someone
else's BitlBee server.This hack will tell you how to install and use BitlBee. If you
don't want to install your own BitlBee, you can just
skip the next section.
|
15.6.1 Installation
BitlBee
is available for a number of different platforms. The authors use it
on Linux machines, but the program also works on several other Unix
platforms. Even AmigaOS and Windows ports are available, though not
supported by the authors. Support for some IM protocols may be
missing on some ports.The easiest way to install BitlBee on your machine is probably
through the packaging system for your distribution, such as
apt-get, emerge, or you can get
it from your BSD ports tree. Most packages do all the hard work for
you, so after installation you can skip the rest of this section and
read more about how to use BitlBee.If there is no package available for your platform or if you just
don't like packages, you can, of course, also
install BitlBee from source. First, get the source from the
sitehttp://www.bitlbee.org.Next,
you simply unpack the tarball. Then you run the
Configure script, make
(remember to use GNU make on BSD systems!) and
make install. This will install
all the program files on your machine.Configure might complain about missing
dependencies. BitlBee currently needs recent versions of
glib and
GnuTLS to work completely. Of course, later
versions of the program may have different dependencies.BitlBee is not a daemon on its own. It depends on something like
inetd to talk to your IRC client. Add a line like
this to /etc/inetd.conf:
ircd stream tcp nowait nobody /usr/local/sbin/bitlbee bitlbeeYou will have to make inetd reload the
configuration files. You can do this by sending the HUP signal to the
inetd process, for example by running the
following:
% /etc/init.d/inetd reloadIf you run xinetd, which is becoming
increasingly common these days, you will have to copy the
doc/bitlbee.xinetd file from the BitlBee source
directory to /etc/xinetd.d/ and send a HUP
signal to xinetd.Of course, if you installed BitlBee to a different location, you
shouldn't forget to put the correct path in the
inetd file! Also, if you're
already running an IRC server on your machine, you will probably have
to change the port number BitlBee listens on. Refer to the
inetd documentation if you
don't know how to do that.
15.6.2 Using BitlBee
If you installed BitlBee
on your own machine, you will now be able to connect to it. In most
clients, all you have to do is type /connect
localhost. If you are running BitlBee on a different
machine, specify the name of that machine instead of
localhost.If you decide to use an external BitlBee server instead of installing
it yourself, you can get a list of servers from http://www.bitlbee.org. Pick a server that is
close to you, connect to it with your IRC client, and read on.When you connect to a BitlBee server, you're
force-joined into a channel called #bitlbee. You will receive a
welcome message from a bot called root. It
should look something like Figure 15-4. Some BitlBee
packagers rename the root user to something else, but this is usually
apparent. The bot will invite you to read the quick start
documentation. The quick start may cover some details that are not
mentioned in this hack, so it's always a good idea
to have a quick look.
Figure 15-4. Being welcomed to BitlBee by root

It's a good idea to register your nickname as soon
as possible. This is not to protect your nickname, but simply to make
things easier the next time you connect. Because BitlBee is not a
real IRC server, you will never notice the other people on the
server, as everyone will be in her very own #bitlbee channel. With
your nickname registered, BitlBee will remember your settings, your
account information, your buddy lists, and everything else. To
register your nickname, just say register
password in the #bitlbee channel, where
password is your password of choice.When you come back later, say identify
password, and BitlBee will restore all
your settings and connect to all your accounts. So,
let's make a connection right now!To manage your IM connections, you can send the
account command to the #bitlbee channel. First,
add all your accounts using the account add
command. This command requires at least three arguments: the
protocol, your
username/handle/screenname,
and your password. For some protocols, you
will also have to specify a servername.
ICQ and AIM, for example, share the same protocol, but use different
servers. Here are some examples of accounts being added:
account add jabber user@server.com passwordAfter adding all your accounts, say account on
account add msn user@domain.com password
account add yahoo nickname password
account add oscar 123456 password login.icq.com
account add oscar aimuser password login.oscar.aol.com
and see how BitlBee connects to all the services you want. For most
protocols, it will also download your buddy lists, and
you'll notice some people joining the #bitlbee
channel. Only the people who are online will be visible in the
channel. As soon as they go offline, you'll see them
quitting from the BitlBee server.Of course, you can also talk to your buddies. Talk to them in the
channel as you normally do on IRC or open a query window. The
recipient won't notice the difference, so use
whichever method you prefer most. Remember that #bitlbee is a virtual
channel. When you talk to foo here, only foo will get your message,
not everyone in the channel. When you are talking in the channel, you
can specify the recipient of your message by prefixing it with his
nickname, for example:
<wilmer> Paul: Hi!If you don't get a buddy list (or if you just want
to add more buddies), you can use the add command.
Before you use this command, you should check which connection number
to use. BitlBee supports multiple protocols and networks, and it
allows you to be connected to more than one network at once. So when
you add a buddy, BitlBee needs to know what buddy list you want to
edit. You can get a list of all your connections using the
account list command.You will get a list like this:
<wilmer> account listAs you can see here, only the first two accounts are connected. If I
<root> 0. OSCAR, 267762 on login.icq.com (connected)
<root> 1. JABBER, lintux@jabber.com/BitlBee (connected)
<root> 2. MSN, lintux@lintux.cx
<root> End of account list
want to add a buddy to my MSN contact list, I have to enable that
account first, using the account on 2 command.
Fortunately, I can add people to my other lists now. To add a
contact, use the add command. This command
requires two arguments: a connection number and a handle. If you
want, you can also specify the nickname to be given to the contact in
BitlBee. If you omit this, BitlBee will generate a unique nickname
from the handle. See the following example:
<wilmer> add 0 32899265 PaulAs you can see above, Paul immediately joins the channel and gets
<root> User `32899265' added to your contact list as `Paul'
-!- Paul [32899265@login.icq.com] has joined #bitlbee
-!- mode/#bitlbee [+v paul] by root
voiced by the bot. This means he's online and not
set as away. If you don't see the person joining the
channel after being added, he is probably just offline.
15.6.3 More Than Just Talking
One last command you really have to know about is the
set command. This command can be used to customize
BitlBee in
many ways. To get a list of available settings, enter
set without any arguments. To change a setting,
provide two arguments. The first argument specifies the setting you
want to change, and the second specifies the new value for this
setting. BitlBee will respond with a confirmation of your changed
setting. If the setting doesn't seem to be changed,
there was something wrong with what you were doing.Also, most essential IRC commands like
/away and /whois work with
BitlBee. Many more root commands are available too. Just enter
help commands to get a full list. You can also
get more information about specific commands. For example, to get
help about the account command, you can enter help
account.There's not enough space in this book to explain
everything about BitlBee. If you're interested and
want more, it's probably a good idea to read the
documentation. Reading the quick start guide is probably the best
place to begin, as it tries to get the reader started with BitlBee as
quickly as possible, but ends up discussing more features than this
hack can.Wilmer van der Gaast