Ask SIPB - February 28, 2003

Athena's built-in instant-messaging system, Zephyr, is both flexible and powerful. In this two-part series, we cover many aspects of Zephyr. This time, we'll cover the basics of sending zephyrgrams to individual users, to instances, and to classes.

How do I send zephyrgrams?

To send a zephyrgram to other users, type:
athena% zwrite user1 user2 user3
where user1, user2, and user3 are the usernames of the intended recipients. You can add as many (or as few) usernames as you want to the zwrite command. If you zephyr multiple people, and you wish to add a CC line to inform them who you are zephyring, add the "-C" flag right after the zwrite. Keep in mind that command line options for zwrite are case-sensitive, so -C is not the same as -c. Often, before sending, you may want to check if the intended recipient is logged in. To do so, type:
athena% zlocate username
The hostname of the computer into which the user is logged in will be displayed. If the user is not logged in, zlocate will return "Hidden or not logged-in."

What is the .anyone file, and how can I use it with znol?

The .anyone file is a buddy list. By creating a text file named .anyone in your home directory with a list of Athena usernames (one on each line), you can easily see which of them is logged in. To see who on your .anyone file is logged in, type:
athena% xzul &
For a more informative, non-refreshing display, type:
athena% znol
After issuing znol, you will receive zephyrgrams when people in your .anyone file log in or log out, if they have set their exposure appropriately. If you wish for this to happen automatically upon logging in, append znol to the end of the .startup.X and/or .startup.tty files in your home directory. (You may have to create the files if they don't exist already.)

What are Zephyr classes and instances?

Zephyr classes and instances allow groups of people to have conversations via Zephyr. Zephyr classes are slightly more private than instances, since you must know the name of a Zephyr class to be able to subscribe to it. Zephyr classes have sub-channels within them called instances. (Although the terms "class" and "instance" come from object-oriented computer programming, their meanings are different in the context of Zephyr.)

When someone talks about a Zephyr instance they usually mean an instance of the default Zephyr class called MESSAGE. Zephyrgrams sent without an explicit class are sent to class MESSAGE. Zephyrgrams sent to class MESSAGE are not private at all. Many people subscribe to the entirety of class MESSAGE. Also, all zephyrgrams to class MESSAGE are logged the zlog locker. Instances of class MESSAGE are good for public discussions that are of interest to many people. For more private conversations amongst a group of friends, explicitly stating a Zephyr class other than MESSAGE is probably preferable.

A Zephyr class exists as long as at least one person is subscribed to it, so if you want to use a new Zephyr class to talk with a group of friends, just come up with a name, and make sure you and your friends are subscribed to that class.

There are three parameters of a zephyrgram that will control who will get it: its class, its instance, and its recipient. When you send a zephyrgram to a friend, using zwrite username, the class is MESSAGE, the instance is PERSONAL, and the recipient is username. These parameters can be changed to allow conversations amongst a group of people via zephyrgrams. What people call a Zephyr class refers to altering the class parameter to be something other than MESSAGE. What people call a Zephyr instance, or public instance, refers to changing the instance parameter to something other than PERSONAL, while still within the class MESSAGE.

How do I send zephyrgrams to a class or instance?

athena% zwrite -i instancename
changes the instance you are sending to from PERSONAL to instancename, and by default sends to the class MESSAGE and the recipient * (that is, everyone subscribed to the instance). For example, zwrite -i help would send a zephyrgram to the instance help, and anyone who had subscribed to the help instance would receive the zephyrgram.
athena% zwrite -c classname
sends a zephyrgram to class classname instead of class MESSAGE. By default, it will send to the instance PERSONAL within class classname, and to the recipient *. The asterisk means that everyone subscribed to that class would receive the zephyrgram.
athena% zwrite -c classname -i instancename
sends a zephyrgram to an instance instancename within the class classname.

Capitalization does not matter in the names of Zephyr classes and instances. For example, zwrite -i white-magic is the same as zwrite -i WHITE-MAGIC, which is the same as zwrite -i WhIte-mAGiC, etc. Anyone subscribed to the instance white-magic will receive zephyrgrams sent with any of these capitalizations.

What are common Zephyr classes and instances?

Examples of some Zephyr instances include white-magic (random discussion), war, war.d (discussion of events mentioned on war), and help. Common Zephyr classes include help (for general questions) geek (discussions about geek toys like computers), and greed (discussions about money and finance).

When zephyring to classes, it is customary to also use an instance name to specify the subject, e.g.:

athena% zwrite -c help -i motorcycles

How do I subscribe to and unsubscribe from a Zephyr class?

To temporarily subscribe to a Zephyr class for just your current Athena session, type:
athena% zctl sub class_name \* \*
To subscribe to a Zephyr class for current and future Athena sessions, type:
athena% zctl add class_name \* \*
To temporarily unsubscribe from a Zephyr class, type:
athena% zctl unsub class_name \* \*
To unsubscribe from a Zephyr class for current and future Athena sessions, type:
athena% zctl del class_name \* \*
To subscribe to or unsubscribe from an Zephyr instance, you should use class MESSAGE, and the name of the instance in place of the first \*. For example, to subscribe to white-magic
athena% zctl add MESSAGE white-magic \*
To stop receiving Zephyrgrams completely for the current Athena session:
athena% zctl wg_exit

To ask us a question, send email to sipb@mit.edu. We'll try to answer you quickly, and we might address your question in our next column. Copies of each column and pointers to additional information will be posted on our website: http://www.mit.edu/~asksipb/