adding zephyr-im master branch
This commit is contained in:
136
zwgc/zwgc.desc
Normal file
136
zwgc/zwgc.desc
Normal file
@ -0,0 +1,136 @@
|
||||
# Copyright 1989, 1990 Massachusetts Institute of Technology
|
||||
#
|
||||
# For copying and distribution information, see the file
|
||||
# "mit-copyright.h".
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#
|
||||
# Default WindowGram description file
|
||||
#
|
||||
|
||||
# Opcode "ping" is used by sender programs to see if the message would
|
||||
# really get sent, or if the recipient has logged out. No useful
|
||||
# information is normally contained in these messages, so we discard them.
|
||||
if (upcase($opcode) == "PING") then exit endif
|
||||
|
||||
#
|
||||
# AUTHENTICATION information
|
||||
#
|
||||
# $auth can be either Yes, No, or Forged
|
||||
#
|
||||
# "Yes" means that the sender field present in the notice was verified by
|
||||
# Kerberos authentication
|
||||
#
|
||||
# "No" means that either the sender did not include any authentication
|
||||
# information, or the authentication information was not verified by the
|
||||
# Zephyr Server before the notice was sent to you.
|
||||
#
|
||||
# "Forged" means that the Server claims that the sender of the notice
|
||||
# was verified by Kerberos authentication, but your WindowGram client
|
||||
# could not verify this. This stage of verification is done by a cryptographic
|
||||
# checksum. The most probable cause of the failure of the checksum
|
||||
# provided by the Server to match the checksum generated by your
|
||||
# WindowGram client is that you changed Kerberos tickets, and the Server
|
||||
# was using an old value to compute the cryptographic checksum. You can
|
||||
# update the Server's value by typing 'zctl load' to your prompt.
|
||||
#
|
||||
# By default, notices which appear forged are labeled as 'UNAUTHENTIC'
|
||||
# to avoid confusion as to what 'Forged' really means.
|
||||
# To change this display, change the last word in the line following
|
||||
# 'match "forged" to something other than "UNAUTHENTIC".
|
||||
case $auth
|
||||
match "yes"
|
||||
set aval = "Authentic"
|
||||
match "no","forged"
|
||||
set aval = "@b(@large(UNAUTHENTIC))"
|
||||
endcase
|
||||
|
||||
case $class
|
||||
match "WG_CTL_CLASS"
|
||||
exit
|
||||
match "message"
|
||||
if (downcase($recipient) == downcase($user)) then
|
||||
case $instance
|
||||
match "PERSONAL"
|
||||
set type = "Personal"
|
||||
match "URGENT"
|
||||
set type = "Urgent"
|
||||
default
|
||||
set type = $instance
|
||||
endcase
|
||||
else
|
||||
set type = "Instance "+$instance
|
||||
endif
|
||||
|
||||
if ($number_of_fields == "1") then
|
||||
fields body
|
||||
set signature = ""
|
||||
else
|
||||
fields signature body
|
||||
endif
|
||||
if ($signature =~ "^[Ff]rom: .*") then
|
||||
set dummy = lany($signature,"From: ")
|
||||
endif
|
||||
if ($signature =~ "\n$") then
|
||||
set dummy = rany($signature,"\n")
|
||||
endif
|
||||
if ($signature == "") then
|
||||
set ftext = "From: @bold("+protect($sender)+")"
|
||||
else
|
||||
set ftext = "From: @bold(@{"+protect($signature)+"} <"+
|
||||
protect($sender)+">)"
|
||||
endif
|
||||
|
||||
print "@center(@bold("+$aval+") "+$type+" message at "+$time+
|
||||
" on "+$date+"\n"+$ftext+" on "+$fromhost+"\nTo: "+
|
||||
$recipient+")\n\n"
|
||||
print $body
|
||||
put
|
||||
exit
|
||||
|
||||
match "login"
|
||||
case $opcode
|
||||
match "USER_LOGIN"
|
||||
set log = "logged in"
|
||||
match "USER_LOGOUT"
|
||||
set log = "logged out"
|
||||
default
|
||||
set log = "unknown opcode"
|
||||
endcase
|
||||
|
||||
fields host when tty
|
||||
print "@center(@bold("+$sender+") "+$log+")\n"
|
||||
print "@center(on @bold("+$host+") on "+$tty+")\n"
|
||||
print "@center(at "+$when+")"
|
||||
put
|
||||
exit
|
||||
|
||||
default
|
||||
if (downcase($class) == "filsys" and downcase($opcode) == "shutdown") then
|
||||
set format = "From $sender:\n@bold(Shutdown message from $1 at $time)\n"+
|
||||
"@center(System going down, message is:)\n\n$2\n\n@center(@bold($3))"
|
||||
elseif (downcase($class) == "filsys") then
|
||||
set format = "@bold(Filesystem Operation Message for $instance:)\n"+
|
||||
"From: @bold($sender) at $time $date\n$message"
|
||||
elseif (downcase($class) == "mail" and downcase($instance) == "popret") then
|
||||
set format = "You have new mail:\n\nFrom: $1\nTo: $2\nSubject: $3"
|
||||
elseif (downcase($class) == "mail") then
|
||||
set format = "From Post Office $1:\n$2"
|
||||
elseif (downcase($class) == "syslog") then
|
||||
set format = "From $sender:\nSyslog message from $instance, level "+
|
||||
"$opcode:\n$message"
|
||||
elseif ($number_of_fields == "1") then
|
||||
set format = "Class $class, Instance $instance:\nTo: @bold($recipient) "+
|
||||
"at $time $date\nFrom: @bold($sender)\n\n$message"
|
||||
else
|
||||
set format = "Class $class, Instance $instance:\nTo: @bold($recipient) "+
|
||||
"at $time $date\nFrom: @bold($1) <$sender>\n\n$2"
|
||||
endif
|
||||
|
||||
print "(Authentication: @bold("+$aval+") from host: "+$fromhost+")\n"
|
||||
print substitute($format)
|
||||
put
|
||||
exit
|
||||
|
||||
endcase
|
Reference in New Issue
Block a user