Need a quick answer from another user
without sending an email message and waiting for his reply? Want to
have a conversation with your Internet-connected friend in Chile but
don’t have money for an international phone call? An
interactive chat program lets you type text to another user and see
her reply moments later. Chatting, or “instant
messaging,” has become popular. Widely known chat
programs such as iChat, Jabber, and AOL Instant Messenger are
available for Mac OS X. Other programs have been available on Unix
systems for years and are included with Mac OS X. We look at two of
these: talk
and IRC.
The
talk
program is
simple to use. Give the username (and, optionally, the hostname) of
the person with whom you want to chat. Then talk
will try to notify that person as well as show how to use
talk
to complete the connection with you. Both of
your terminal windows will be split into two sections, one for the
text you type and the other for the text you get from the other
person. You can type messages back and forth until one of you uses
Control-C to break the session.
One advantage of talk
is its simplicity; if each
of you has a terminal window open, either of you can run the program
at any time; if the other person is logged in, he is notified that
you want to chat and told how to complete the connection. If both
people want to use talk
on the same
computer — even if one of them is logged in remotely (see Section 7.1) — it should work well.
Unfortunately, there are several talk
versions
that don’t work with each other. So, the first time
you try to chat with someone on another host, which might have
another talk
version (or other problems), it can
take planning. Use an email message or phone call to alert them that
you’ll try talk
ing soon, then
experiment to be sure that both of you have compatible
talk
systems. After that, you’re
all set.
Here’s the syntax:
talkusername
@hostname
If the other user is logged onto the same computer as you, omit the @hostname. After you run that command, your screen clears with a line of dashes across the middle. The top half shows text you type and informational messages about the connection. The bottom half shows what the other user types.
For example, if your username is juan,
you’re logged onto the computer
sandya.unm.edu, and you want to talk to the user
ana at the computer
cielo.cl, you would type talk [email protected]
. If the connection works, your screen clears
and you’ll see something like:
[No connection yet]
[Waiting for your party to respond]
[Waiting for your party to respond]
[Connection established]
Hi, Ana! Need any help with your exam?
The message [Waiting
for
your
party
to
respond]
means that your
talk
program has found
ana’s system and is waiting for
her to respond. Ana’s terminal bell should ring and
she should see a message like this in one of her terminal windows:
Message from [email protected] at 18:57 ... talk: connection requested by [email protected]. talk: respond with: talk [email protected]
If she answers by typing talk
[email protected]
, the connection should be
completed, and her screen should clear and look like yours. What she
types appears on the top half of her screen and the bottom half of
yours, and vice versa. It’s not always easy to know
when the other person has finished typing; one convention is to type
o
(for “over”)
when you want a response; type oo
(for
“over and out”) when
you’re finished. The conversation goes on until one
person types Control-C to actually break the connection.
Unfortunately, because there are several versions of
talk
, and because other things can go wrong, you
may see other messages from the talk
program. One
common message is [Checking
for
invitation
on
caller's
machine]
, which usually means that you
won’t be able to connect. If this happens,
it’s possible that one system has other versions of
the talk
program that won’t work
with the particular system to which you’re trying to
connect — try the
ytalk
program (available through Fink;
see Section 8.1, earlier in this
chapter), for instance. It might also be easier to use a more
flexible chat system, such as IRC.
Internet Relay Chat (IRC)
is a long-established system for chatting with other users worldwide.
IRC is fairly complex, with some rules you need to understand before
using it. We give a brief introduction here; for more details, see
http://www.irchelp.org. Mac OS X,
by default, doesn’t include an IRC client, so
you’ll need to download one. For a good place to
start, download the Fink package management system (see Section 8.1, earlier in this chapter),
install it, and then at the Terminal command line type sudo apt-get
install
ircii
to install ircII.
Unlike the
talk
program, IRC
programs let you talk with multiple users on multiple channels.
Channels have names, usually starting with #
, such
as #football. (You might hope that a channel
name would tell you what sort of discussions happen there, but
you’d often be wrong!) Many channels are shared
between multiple servers on an IRC net, or
network; you connect your IRC program to a nearby server, which
spreads your channel to other servers around the net. Some channel
names start with &
; these channels are local
to their server, and not shared around the net. Finally, you can meet
a user from a channel and have a private conversation, a
“DCC (Direct Client Connection)
chat,” that doesn’t go through
servers.
Each user on a channel has a nick , or nickname, which is up to nine characters long. It’s a good idea to choose a unique nick. Even when you do, if someone else with the same nick joins a channel before you do, you must choose another nick.
Two kinds of users are in control of each channel. Ops, or channel operators, choose which other users can join a channel (by “banning” some users from joining) and which users have to leave (by “kicking off” those users). If a channel is empty, the first user to join it is automatically the channel op. (As you can imagine, this system means that some ops can be arbitrary or unhelpful. If an op treats you badly, though, you can just go join another of the thousands of IRC channels.) IRC ops, on the other hand, are technical people in charge of the servers themselves; they don’t get involved with “people issues.”
IRC not only lets you chat, it lets you share files with other users. This can be helpful, but it also can be dangerous; see the upcoming warning.
There are
many IRC programs, or “clients,”
for different operating systems. They all work with each other,
though some have more features. The best known Unix program is ircII,
which you run by typing irc
. Another well-liked
program, based on ircII, is
bitchx
; get it from http://www.bitchx.org. Many programs can be
modified by using
scripts
or
bots
;
there are thousands of these floating around IRC. But we advise you
to use only well-known programs, and to avoid scripts and bots,
unless you know that they’re safe.
IRC
started long before graphical programs were
popular. IRC programs use commands that start with a slash
(/
), such
as /join #football
or /whois
StevieNix
. Some IRC programs have buttons and
menus that run commands without typing, but you’ll
probably find that learning the most common commands is
easy — and makes chatting faster, overall, than using a mouse.
Finally, you should know that IRC users can get information about you
with the /whois
nick
command, where nick
is your current nick.
They’ll see your real name unless you set the
IRCNAME
environment variable to another name in
your .tcshrc and launch a new Terminal window to
make the change take effect. This is explained in Section 4.2. (By the way, use /whois
with your nick to find out what other people can see about you.)
IRC can be a wide-open security hole if you don’t use it carefully. If you type the wrong command or use an insecure program or script, any user can take over your account, delete all your files, and more. Be careful!
IRC programs can be corrupted; scripts and bots can easily do damage.
Even if you think that one is widely known and safe, it can contain a
few lines of dangerous “trojan
horse” code added by an unscrupulous user. Also,
never type a command that another IRC user suggests unless
you’re sure you know what it does;
/load
and /dcc get
can be
especially dangerous.
When you type irc
, your terminal screen splits
into two parts. The top part shows what’s happening
on the server and the channel; the bottom part (a single line) is
where you type commands and text. In between the two parts is a
status line with the time of day, your nick, and other information.
Some terminals can’t do what irc
wants them to; if you get an error message about this, try the
command irc -d
to use “dumb
mode” instead.
A good ircII command to start with is /help
, which
provides a list of other commands. The commands /help intro
and /help newuser
give
introductions. For help with a particular command, give its
name — such as /help
server
for help with the /server
command. When
you’re done with help, you’ll get a
Help?
prompt; you can type another help topic
name, or simply press Return to leave the help system. Another common
command is /motd
, the “message of
the day,” which often explains the
server’s policies.
You can type your nick on the irc
command line.
Your IRC program should have a default server. You can change servers
with the /server
command; you’d
do this if your server is full (you get the message
“connection timed out,”
“connection refused,” etc.). If
your default IRC server is down or busy, you can also give a server
hostname on the irc
command line, after your nick.
In the following examples, we show the text you type (from the bottom
line of the screen) in boldface
, followed by
the responses you might see (from the top of the screen) in unbolded
text.
We used these commands:
%setenv IRCNAME "Steve St. John"
%irc sstjohn us.undernet.org
*** Connecting to port 6667 of server us.undernet.org ... *** Closing Link: sstjohn by austin.tx.us.undernet.org (Sorry, your +connection class is full - try again later or try another server) *** Connecting to port 6667 of server us.undernet.org ... *** Welcome to the Internet Relay Network sstjohn (from +Arlington.VA.US.Undernet.Org) ... *** on 1 ca 1(4) ft 10(10)/motd
*** The message of the day was last changed: 22/12/2001 *** on 1 ca 1(4) ft 10(10) *** - Arlington.VA.US.Undernet.Org Message of the Day - *** - 27/7/2001 20:39 ... *** - SERVER POLICIES: .../help newuser
*** Help on newuser ... *** Hit any key for more, 'q' to quit *** ... Help? Return /whois sstjohn *** sstjohn is [email protected] (Steve St. John) *** on irc via server *.undernet.org (The Undernet Underworld) *** sstjohn has been idle 1 minutes
Messages from the server start with
***
. Long lines are broken and continue on
following lines that start with +
. After
connecting to the server, we used /whois
with our
nick to find what information other users could see about us. The
Undernet servers have thousands of channels open, so we started by
searching for channels with “help”
in their names; you can use wildcards, such as
*help*
, to do this:
/list *help*
*** Channel Users Topic *** #helpmania 2 A yellow light, an open door, hello neighbor, +there's room for more. English *** #underneth 14 -= UndernetHelp =- Ask your color free questions +& wait for it to be answered. ([email protected]) *** #mIRCHelp 14 Welcome to Undernet's mIRC Help Channel! Beginners +welcome :-) *** #irc_help 48 Welcome to #irc_help. We do not assist in +questions/channels regarding warez, mp3, porn, fserve, etc. ...list goes on and on.../list *mp3*
...list of groups discussing/sharing MP3 files...
We want to see what’s happening, so we join the biggest help channel: #irc_help, which has 48 users now:
/join #irc_help
*** sstjohn ([email protected]) has joined channel #irc_help
*** Topic for #irc_help: Welcome to #irc_help. We do not assist in
+questions/channels regarding warez, mp3, porn, fserve, etc.
*** Users on #irc_help: sstjohn ChuckieCheese Dodgerl GooberZ
+Kinger MotorMouth @theDRJoker MrBean SweetPea LavaBoy GrandapaJoe
...
Some names in the list of users, such as
@theDRJoker,
start with @
; these users are ops.
Let’s watch some more of the action. After a couple
of users leave the channel, a new user, MsTiger,
joins and asks for help. Each time a user types a line of text that
isn’t a command, it’s sent to
everyone else on the channel, preceded by that
user’s nick, such as
<MsTiger>
:
*** ChuckieCheese has left channel #irc_help *** GooberZ has left channel #irc_help *** HelloWorld ([email protected]) has joined channel #irc_help *** MsTiger ([email protected]) has joined channel #irc_help <MsTiger> help me <MsTiger> please <Kinger> MsTiger what can we help you with ? <MsTiger> my channel is not op <Kinger> LavaBoy tell MsTiger about no opers <LavaBoy> MsTiger, *shrug* <GrandapaJoe> MsTiger Sorry, but there are currently NO IRC Operators +available to help you with your channels. Please be patient and wait +for an Operator to join. *** MsTiger has left channel #irc_help
The channel has gotten quiet, so we jump in with a question:
Hello all. When I joined, I had a problem
...
Any suggestions??
*** Thor ([email protected]) has joined channel #irc_help <[Wizard]> Can you help me plz <LavaBoy> Try typing !help in the channel, [MORTAL]./leave
*** sstjohn has left channel #irc_help/quit
%
No one had an answer, so we left the channel after a few minutes of
waiting. Other channels might be a lot livelier and might have had
someone willing to chat about my question, but we left the
irc
program by typing
/quit
.
Then we got another shell
prompt.
3.145.151.26