summaryrefslogtreecommitdiff
path: root/zwgc/zwgc.desc
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-11-15 17:48:53 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-11-15 17:48:53 +0000
commita9959fa1e5c8a29280fe23bf9feb4eb4e1c858c1 (patch)
treeffaba8f258a2958e4e4e1d4e47c157e036cce9da /zwgc/zwgc.desc
parent67716e0919aeba743df6c92b84d7e3b1cb327b58 (diff)
Initial revision
Diffstat (limited to 'zwgc/zwgc.desc')
-rw-r--r--zwgc/zwgc.desc77
1 files changed, 77 insertions, 0 deletions
diff --git a/zwgc/zwgc.desc b/zwgc/zwgc.desc
new file mode 100644
index 0000000..c04e51b
--- /dev/null
+++ b/zwgc/zwgc.desc
@@ -0,0 +1,77 @@
+case $auth
+match "yes"
+ set aval = "Authentic"
+match "no"
+ set aval = "UNAUTHENTIC"
+match "forged"
+ set aval = "UNAUTHENTIC"
+endcase
+
+case $class
+match "WG_CTL_CLASS"
+ if ($opcode == "WG_STARTUP") then
+ print "@large(Zwgc mark II version "+$version+" now running...\n)"
+ put
+ endif
+ exit
+
+match "message"
+ if (upcase($opcode) == "PING") then exit endif
+
+ case $instance
+ match "PERSONAL"
+ set type = "Personal"
+ match "URGENT"
+ set type = "Urgent"
+ default
+ set type = "Instance "+$instance
+ endcase
+
+ fields signature body
+ if ($body == "") then
+ set body = $signature
+ set signature = ""
+ endif
+ if ($signature =~ "From: .*") 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+"\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
+ print "(Authentication: @bold("+$aval+"))\n"
+ print substitute($default)
+ put
+ exit
+
+endcase