next up previous contents
Next: Logging your Zephyrgrams Up: Recieving Zephyrgrams Previous: Showing Pings   Contents

How To Ignore People

People often express interest in doing something like hiding from a specific user, so that they can't zwrite you and don't know that you are logged in, while everyone else can zwrite you. Zephyr is not actually capable of doing this completely. You can not set it up so that Zephyr will give a yourusername: not logged in or not subscribing to messages error message to some people and not to others. However, there is a way to edit your .zwgc.desc to filter out zephyrgrams from any users you wish, and to send an automatic message to them saying something to inform them that you are not receiving their messages. Again, the .zwgc.desc lines that do this will be explained with comments in the code. Here is the code:

# punting a user
# zctl set username punt
# zctl unset username
        set test = zvar($sender)
# take the sender's username, and assign it to a variable called test

        if ($test == "punt") then
#if the sender's username has been set to punt

        if (upcase($instance) == "PERSONAL" && upcase($class)=="MESSAGE") then
# if it is also a personal Zephyr sent only to you

        exec "zwrite" "-q" "-n" $sender "-m"
        "Your Zephyr is not being received at this time."
# send them a message, and don't print the Zephyr
# you should not have a return between the -m and the message
                        exit
                endif
                exit
        endif
# exit from the .zwgc.desc without printing any zephyrgrams

Then, in order to ``punt'' a particular user's zephyrgrams. For this to work immediately after you have edited and saved your .zwgc.desc file, you would first need to type the command zctl wg_read to make your changes take effect. You can type

zctl set username "punt"

and to ``unpunt'' them (see their zephyrgrams again and stop ignoring them), you can type

zctl unset username

The basic methods used in this code sample allow you to make your own Zephyr variables and then set them from your athena% prompt using zctl set. If you want a customization to only happen when you explicity say so, you could make up the name of a variable, and use zvar to make it a variable. You could have if statements in your .zwgc.desc that will execute the customization for certain values of that variable.

In your .zwgc.desc, before you use it as a variable, you need to add a line that says something like

set variable = zvar($variable)

Then to change its value you would type

zctl set variable value

For variables that you want to set to values like ``punt'' or ``true,''

you would have to quote the word that you want to be the value, in both assigning the value with zctl set and in testing the value in .zwgc.desc.


next up previous contents
Next: Logging your Zephyrgrams Up: Recieving Zephyrgrams Previous: Showing Pings   Contents
Arun A Tharuvai 2004-04-08