How To Ignore People

People often express interest in hiding from a specific user, so that eviljoe can't zwrite you and doesn't know that you are logged in, but everyone else can zwrite you. Zephyr is not actually capable of this exact functionality, but it comes close. You can not set it up so that Zephyr will give a yourusername: not logged in or not subscribing to messages error message to eviljoe and not to everyone else. However, there is a way to edit your .zwgc.desc to filter out zephyrgrams from any users you specify and to send them an automatic message informing them that you are not receiving their messages. Again, the relevant .zwgc.desc lines will be explained with comments in the code. Here is the code:

# punting a user
# zctl set username punt
# zctl unset username

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

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

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

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

For your changes to .zwgc.desc to take effect without logging out and logging in, you will neeed to type zctl wg_read to re-read the configuration file. Then, in order to ``punt'' a particular user's zephyrgrams, 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 a variable, you need to declare it, thusly:

set variable = zvar("value")

Then, to change its value, you would type

zctl set variable value

Note that if you want to set variables to non-numerical values like ``punt'' or ``true,'' you will need to quote the word both when you set it with zctl set and when you test it in .zwgc.desc.

Geoffrey G Thomas 2009-02-09