How To Ignore People

Previous: Colors and Locations

Up: Simple Zephyr Hacks and Customizations

Next: Logging your Zephyrs


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 never 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 a zaway-type 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 zephyrs
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

One interesting thing to note about this is that 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. So 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. Then 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.