## NOTE: this file has been machine-generated.  It's ugly.  So?  =)
##
## zwgc2zion translator,  version 0.967 <08sep1996>
##  Zwgc::Desc tokenizer, version 1.00 <22aug1996>
##  translation rules,    version 0.20 <08sep1996>

use FileHandle;
use IPC::Open2;

use lib '/afs/sipb.mit.edu/user/bert/dev/zion';
use Zion::Zwgc 0.01;
BEGIN { $Zion::Zwgc::Debug = 1; }   # comment this out to suppress messages

use vars qw( %ZVAR %port );
%ZVAR = Zion::Zwgc::zephyr_variables("$ENV{'HOME'}/.zephyr.vars")
	unless %ZVAR;

my $_buffer_ = '';
my @fields = Zion::fields();

### this file was automatically generated using generate.m4 $Revision: 1.1 $
### Do not modify it manually, modify the template file (or the list of
### symbols defined on command line) instead.
#
# $Id: zwgc.desc.template,v 1.7 1996/05/08 23:21:41 bert Exp bert $
# $Source: /afs/athena.mit.edu/user/b/e/bert/.conf/zephyr/RCS/zwgc.desc.template,v $
#
# ZCTL VARIABLES (AND VALUES) USED:
# [the list depends on options specified on the command line]
#
#  show-pings:   "ALL"		= show pings to instances and classes
#                "" or unset	= don't show pings
#                anything else	= show pings to "bert@athena.mit.edu" only.
#
#  debug:        "PRINT"	= also show all messages in a debugging format
#                "DEFAULT"	= also show "default" display
#                "IGNORE"	= also show output of "ignore" code
#                anything else	= disables debugging
#
#  ignore:       "TOTAL"	= do not display any @-commands
#                "" or unset	= show all @-commands normally
#                "CASE"	= use `ignore-*' variables, described below
#                anything else	= show @-commands verbatim
#
#
#  body-ignore-<foo>: 
#                if `ignore' is set to "CASE", then
#                        "TOTAL"	= do not display @<foo> strings in body
#                        "" or unset	= show @<foo> in body normally
#                        anything else	= show @<foo> in body verbatim
#                (otherwise, the values are ignored)
#
#  sig-ignore-<foo>:
#                equivalent to `body-ignore-<foo>', but for zsig.
#
# Note that the values of some of the Zephyr variables are re-read
# only when .zwgc.desc is reloaded.  You will have to do
# 		zctl wg_read
# before the changes of those variables propagate.
#

{my $_case_ = $auth; if (0) {} # so every 'match' is an elsif

 elsif(grep($_case_ eq $_,"yes")){
$aval="Authentic";
} elsif(grep($_case_ eq $_,"no")){
$aval="Unauthentic";
} elsif(grep($_case_ eq $_,"forged")){
$aval="Forged";
}}

$class= lc($class);
$instance= lc($instance);
$recipient= lc($recipient);
$sender= lc($sender);
$fromhost= uc($fromhost);

 if( ( ( $zdebug eq "PRINT" )||( $zdebug eq "PRINT_ALL" ) ) ) {
$style="system";
 $_buffer_ .= join(" ", "Inbound zephyrgram information:\n"); 
 $_buffer_ .= join(" ", "From: `\@bold(".$sender.")' "); 
 if( ( $zdebug eq "PRINT_ALL" ) ) { $_buffer_ .= join(" ", "[".$fullsender."] "); }
 $_buffer_ .= join(" ", "at host `\@bold(".$fromhost.")'\n"); 
 $_buffer_ .= join(" ", "\@bold(".$aval."); "); 
 $_buffer_ .= join(" ", "to: `\@bold(". Zion::Zwgc::protect($class)."', `". Zion::Zwgc::protect($instance)); 
 $_buffer_ .= join(" ", "', `".$recipient.")'\n"); 
 $_buffer_ .= join(" ", "Type: `\@bold(". Zion::Zwgc::protect($kind).")', "); 
 $_buffer_ .= join(" ", "opcode: `\@bold(". Zion::Zwgc::protect($opcode)."'), ");  $_buffer_ .= join(" ", "sent on `".$date."'\n"); 
 if( ( $zdebug eq "PRINT_ALL" ) ) {
 $_buffer_ .= join(" ", "default format: [". Zion::Zwgc::protect($default)."]\n"); 
 $_buffer_ .= join(" ", "Gory detail:\n"); 
 $_buffer_ .= join(" ", "driver: `".$output_driver."'\n"); 
 $_buffer_ .= join(" ", "zwgc version: `".$version."'\n"); 
 $_buffer_ .= join(" ", "notice version: `".$zephyr_version."'\n"); 
}
 $_buffer_ .= join(" ", "\n# of fields: \@bold(".$number_of_fields.")\n"); 
 $_buffer_ .= join(" ", "1:\@[[". Zion::Zwgc::verbatim($fields[0])."]]\n"); 
 $_buffer_ .= join(" ", "2:\@[[". Zion::Zwgc::verbatim($fields[1])."]]\n"); 
 $_buffer_ .= join(" ", "3:\@[[". Zion::Zwgc::verbatim($fields[2])."]]\n"); 
 $_buffer_ .= join(" ", "4:\@[[". Zion::Zwgc::verbatim($fields[3])."]]\n"); 
 $_buffer_ .= join(" ", "5:\@[[". Zion::Zwgc::verbatim($fields[4])."]]\n"); 
 $_buffer_ .= join(" ", $ezwgc_term); 
 Zion::put($_buffer_); 
$style="";
 $_buffer_ = ""; 
}
 if( ( $zdebug eq "DEFAULT" ) ) {
$style="system";
 $_buffer_ .= join(" ",  Zion::Zwgc::substitute($default)); 
 $_buffer_ .= join(" ", $ezwgc_term); 
 Zion::put($_buffer_); 
$style="";
 $_buffer_ = ""; 
}

 if( ( $opcode eq "PING" ) ) {
 if( ( $zpings&&( ( $recipient eq "bert\@athena.mit.edu" )||$zpingall ) ) ) {
$style="ping";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[ZPING!]\n"); 
 if( ( $class ne "message" ) ) {
 $_buffer_ .= join(" ", "class ". Zion::Zwgc::protect($class)." instance ". Zion::Zwgc::protect($instance)."\n"); 
} elsif( ( $instance ne "personal" ) ) {
 $_buffer_ .= join(" ", "instance ". Zion::Zwgc::protect($instance)."\n"); 
}
 if( ( $recipient ne "bert\@athena.mit.edu" ) ) {
 $_buffer_ .= join(" ", "recipient ". Zion::Zwgc::protect($recipient)."\n"); 
}
 $_buffer_ .= join(" ",  Zion::Zwgc::protect($sender)."\@".$fromhost."]]\n"); 
 $_buffer_ .= join(" ", $ezwgc_term); 
 Zion::put($_buffer_); 
}
$style="";
 exit; 
}

$dot_d="";
$baseinst=$instance;
 while( ( $baseinst=~ m".*[.]d" ) ) {
$dot_d= Zion::Zwgc::any(\$baseinst, -length(".d")).$dot_d;
}

$msg="";
$body=$fields[1];
 if( ( $zignore ) ) {
 while( ( $body=~ m".*\@.*" ) ) {
$msg=$msg. Zion::Zwgc::break(\$body, "^", "\@", ""). Zion::Zwgc::any(\$body, 0, length("\@"));
$spec= Zion::Zwgc::break(\$body, "^", "()[]{}<>\@ ", "");
$brack= Zion::Zwgc::any(\$body, 0, length("("));
{my $_case_ = $brack; if (0) {} # so every 'match' is an elsif

 elsif(grep($_case_ eq $_,"\@")){
 if( ( $spec eq "" ) ) {
$msg=$msg."\@";
}{
$msg=$msg."\@".$spec;
$body="\@".$body;
}
} elsif(grep($_case_ eq $_,")","]","}",">"," ","")){
$msg=$msg."\@".$spec.$brack;
} elsif(grep($_case_ eq $_,"(","[","{","<")){
 if( ( $zignorecase&& $ZVAR{"body-ignore-".$spec} eq "" ) ) {
$msg=$msg.$spec.$brack;
} elsif( ( $zignoretot||( 
$zignorecase&& $ZVAR{"body-ignore-".$spec} eq "TOTAL" ) ) ) {
$msg=$msg.$brack;
}{
$msg=$msg."\@".$spec.$brack;
}
}}
}
}
$msg=$msg.$body;

$sig="";
$siggy=$fields[0];
 if( ( $zignore ) ) {
 while( ( $siggy=~ m".*\@.*" ) ) {
$sig=$sig. Zion::Zwgc::break(\$siggy, "^", "\@", ""). Zion::Zwgc::any(\$siggy, 0, length("\@"));
$spec= Zion::Zwgc::break(\$siggy, "^", "()[]{}<>\@ ", "");
$brack= Zion::Zwgc::any(\$siggy, 0, length("("));
{my $_case_ = $brack; if (0) {} # so every 'match' is an elsif

 elsif(grep($_case_ eq $_,"\@")){
 if( ( $spec eq "" ) ) {
$sig=$sig."\@";
}{
$sig=$sig."\@".$spec;
$siggy="\@".$siggy;
}
} elsif(grep($_case_ eq $_,")","]","}",">"," ","")){
$sig=$sig."\@".$spec.$brack;
} elsif(grep($_case_ eq $_,"(","[","{","<")){
 if( ( $zignorecase&& $ZVAR{"zsig-ignore-".$spec} eq "" ) ) {
$sig=$sig.$spec.$brack;
} elsif( ( $zignoretot||( 
$zignorecase&& $ZVAR{"zsig-ignore-".$spec} eq "TOTAL" ) ) ) {
$sig=$sig.$brack;
}{
$sig=$sig."\@".$spec.$brack;
}
}}
}
}
$sig=$sig.$siggy;

 if( ( $zdebug eq "IGNORE" ) ) {
$style="system";
 $_buffer_ .= join(" ", "Inbound zephyrgram information:\n"); 
 $_buffer_ .= join(" ", "From: `\@bold(".$sender.")' at host `\@bold(".$fromhost.")'\n"); 
 $_buffer_ .= join(" ", "\@bold(".$aval."); "); 
 $_buffer_ .= join(" ", "to: `\@bold(". Zion::Zwgc::protect($class)."', `". Zion::Zwgc::protect($instance)); 
 $_buffer_ .= join(" ", "', `".$recipient.")'\n"); 
 $_buffer_ .= join(" ", "Type: `\@bold(". Zion::Zwgc::protect($kind).")', "); 
 $_buffer_ .= join(" ", "opcode: `\@bold(". Zion::Zwgc::protect($opcode)."')\n"); 
 $_buffer_ .= join(" ", "\n# of fields: \@bold(".$number_of_fields.")\n"); 
 $_buffer_ .= join(" ", "sig:\@[[". Zion::Zwgc::verbatim($sig)."]]\n"); 
 $_buffer_ .= join(" ", "msg:\@[[". Zion::Zwgc::verbatim($msg)."]]\n"); 
 $_buffer_ .= join(" ", $ezwgc_term); 
 Zion::put($_buffer_); 
$style="";
 $_buffer_ = ""; 
}

$style="public";
$do_put="TRUE";

 if( ( $opcode eq "no_ignore" ) ) {
$sig=$fields[0];
$msg=$fields[1];
}

{my $_case_ = $class; if (0) {} # so every 'match' is an elsif

 elsif(grep($_case_ eq $_,"message")){
{my $_case_ = $baseinst; if (0) {} # so every 'match' is an elsif
# instance w/o [.d]s

 elsif(grep($_case_ eq $_,"personal","urgent")){
$style="private";
 $_buffer_ .= join(" ", "\@c[".$aval); 
 if( ( ( $instance eq "urgent" )||( $dot_d ne "" ) ) ) {
 $_buffer_ .= join(" ", ", \@b[*URGENT*".$dot_d."]"); 
}
 $_buffer_ .= join(" ", ", ".$date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"znol")){
$style="info";
 $_buffer_ .= join(" ", "\@helvetica[Oh no... not \@i[YOU] again... ah well...\n"); 
 $_buffer_ .= join(" ", "\@c[\@large[The Manic Computer Mob is:]]]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"today")){
$style="info";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[Calendar says:]]]\n".$msg); 
} elsif(grep($_case_ eq $_,"mach")){
$style="info";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[Machine information:]]]\n".$msg); 
} elsif(grep($_case_ eq $_,"help","sipb")){
$style="public";
 $_buffer_ .= join(" ", "\@c[".$date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@helvetica[\@b[". uc($baseinst).$dot_d."]]\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"b5-quotes")){
$style="fun";
 $_buffer_ .= join(" ", "\@c[\@b[".$instance."], "); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"white-magic")){
$style="magic";
 if( ( $dot_d ne "" ) ) {$dot_d=" ".$dot_d;}
 $_buffer_ .= join(" ", "\@c[\@times[\@i[\@b[White Magic".$dot_d."]]]\n"); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"cigam-etihw")){
$style="magic";
$revmsg="";
$orig=$fields[1];
 while( ( $orig ne "" ) ) {
$revmsg=$revmsg. Zion::Zwgc::any(\$orig, -length("*"));
}
 $_buffer_ .= join(" ", "\@c[\@times[\@i[\@b[cigaM etihW]]]\n"); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$revmsg); 
} else {
 $_buffer_ .= join(" ", "\@c[\@b[". uc( Zion::Zwgc::any(\$instance, 0, length(" "))).$instance."], "); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
}}
} elsif(grep($_case_ eq $_,"olc")){
($msg) = @fields; 
$style="pong";
 if( ( $msg=~ m"From: OLC Service\n" ) ) {
$dummy= Zion::Zwgc::any(\$msg, 0, length("From: OLC Service\n"));
}{
$msg="=) ".$msg;
}
 $_buffer_ .= join(" ", "\@c[OLC, ".$instance); 
 if( ( $recipient ne "*" ) ) { $_buffer_ .= join(" ", ", ".$recipient); }
 $_buffer_ .= join(" ", "\n".$opcode."\n"); 
 $_buffer_ .= join(" ", "\@small[".$date.", ".$time."]\n"); 
 if( ( $auth ne "yes" ) ) {
 $_buffer_ .= join(" ", "\@b[ALERT: ".$aval); 
 $_buffer_ .= join(" ", " <". Zion::Zwgc::protect($sender)."> on ".$fromhost."]\n"); 
}
 $_buffer_ .= join(" ", "]".$msg); 
} elsif(grep($_case_ eq $_,"discuss")){
$style="notice";
($trn,$mtg,$dsender,$subj,$dfrom) = @fields; 
 if( ( $dsender=~ m".*\@ATHENA.MIT.EDU" ) ) {
$foo= Zion::Zwgc::any(\$dsender, -length("\@ATHENA.MIT.EDU"));
}
 $_buffer_ .= join(" ", "\@c[\@helvetica{\@large[Discuss]\n"); 
 if( ( $opcode ne "NEW_TRN" ) ) {
 $_buffer_ .= join(" ", "\@b[opcode: ".$opcode."]\n"); 
}
 $_buffer_ .= join(" ", "[".$trn."] in \@b[".$mtg."]}\n"); 
 $_buffer_ .= join(" ", "\@small[".$instance."]\n"); 
 if( ( $dsender ne "daemon" ) ) {
 $_buffer_ .= join(" ", "Sender:  ". Zion::Zwgc::protect($dsender)."\n"); 
}
 if( ( $dfrom ne "" ) ) {
 $_buffer_ .= join(" ", "From:  ". Zion::Zwgc::protect($dfrom)."\n"); 
}
 $_buffer_ .= join(" ", "Subject:  ". Zion::Zwgc::protect($subj)."\n]"); 
} elsif(grep($_case_ eq $_,"www-log")){
$style="system";
 $_buffer_ .= join(" ", "\@c[WWW: \@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">] on "); 
 $_buffer_ .= join(" ", $fromhost."]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"filsrv")){
$style="system";
 $_buffer_ .= join(" ",  Zion::Zwgc::protect( Zion::Zwgc::substitute($default))); 
} elsif(grep($_case_ eq $_,"syslog")){
 if( ( $recipient eq "bert\@athena.mit.edu" ) ) {
 if( ( $opcode=~/$zsyslog/ ) ) {
$style="system";
 $_buffer_ .= join(" ", "\@small[". Zion::Zwgc::protect( Zion::Zwgc::substitute($default))."]"); 
} elsif( ( $never_true ) ) {
$style="private";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[SYSLOG]]]\n". Zion::Zwgc::protect( Zion::Zwgc::substitute($default))); 
}{
$style="blip";
 $_buffer_ .= join(" ", "\@small[". Zion::Zwgc::protect( Zion::Zwgc::substitute($default))."]"); 
}
}{
$style="system";
 $_buffer_ .= join(" ", "\@small[". Zion::Zwgc::protect( Zion::Zwgc::substitute($default))."]"); 
}
} elsif(grep($_case_ eq $_,"netstat")){
$style="system";
 $_buffer_ .= join(" ", "\@c[\@helvetica[NETSTAT \@ ".$fromhost." (".$time.")]]"); 
 $_buffer_ .= join(" ", "\@small[". Zion::Zwgc::protect( Zion::Zwgc::substitute($fields[1]))."]"); 
} elsif(grep($_case_ eq $_,"noc")){
$style="system";
 if( ( $default eq ( "\@center(\@bold(NOC Message))\n\n\@bold(Sender:) \$1 <\$sender>\n"."\@bold(Time:  ) \$time\n\n\@italic(\$opcode service on \$instance \$3.)"." \$4\n" ) ) ) 

{
 $_buffer_ .= join(" ", "\@small["); 
 $_buffer_ .= join(" ", "NOC --- ".$time." --- ".$opcode." ".$fields[1]."\n"); 
 $_buffer_ .= join(" ", $instance." ".$fields[2]." ".$fields[3]); 
}{
 $_buffer_ .= join(" ", "\@small[". Zion::Zwgc::protect( Zion::Zwgc::substitute($default))."]"); 
}
} elsif(grep($_case_ eq $_,"moira")){
 if( (  lc($fromhost) eq "sos.mit.edu" ) ) {
$do_put="FALSE";
}{
$style="system";
 $_buffer_ .= join(" ", "\@helvetica[\@large[Moira: ".$instance."]]\n"); 
 if( ( (  lc($fromhost) ne "blaaa.mit.edu" )&&(  lc($sender) ne "blaaa" ) ) ) {
 $_buffer_ .= join(" ", "from ". Zion::Zwgc::protect($sender)." on host ". Zion::Zwgc::protect($fromhost)."\n"); 
}
 $_buffer_ .= join(" ", "\@small[". Zion::Zwgc::protect($fields[0]). Zion::Zwgc::protect($fields[1])."]"); 
}
#match "afsadm"
# if (downcase($fromhost)=="euterpe.mit.edu") then
# else
# 
} elsif(grep($_case_ eq $_,"mail")){
 if( ( $instance eq "pop" ) ) {
$style="private";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[New Mail]\n"); 
 $_buffer_ .= join(" ", "at ".$fields[0]."]]\n"); 
} elsif( ( $instance eq "from" ) ) {
$style="private";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[New Mail:]\n"); 
 $_buffer_ .= join(" ",  Zion::Zwgc::protect($fields[1])."]]"); 
}
} elsif(grep($_case_ eq $_,"login")){
$style="private";
($mach,$time,$tty) = @fields; 
 if( ( $opcode eq "USER_LOGIN" ) ) { $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[LOGIN, "); 
} elsif( ( $opcode eq "USER_LOGOUT" ) ) {
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[LOGOUT, "); 
}{
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[class LOGIN, opcode ". Zion::Zwgc::protect($opcode).", "); 
}
 $_buffer_ .= join(" ", $sender."]\n"); 
 if( (  lc($mach) ne  lc($fromhost) ) ) {
 if( ( (  lc($mach).".mit.edu" ) ne  lc($fromhost) ) ) {
 $_buffer_ .= join(" ", "\@large[sent from ".$fromhost."]\n"); 
}{
 $_buffer_ .= join(" ", "correct\n"); 
}
}
 if( (  lc($fullsender) ne  lc($instance) ) ) {
 $_buffer_ .= join(" ", "\@large[instance ". Zion::Zwgc::protect($instance)."]\n"); 
}
 if( ( $tty!~ m"^:" ) ) {$tty=",".$tty;}
 $_buffer_ .= join(" ", "on ". Zion::Zwgc::protect($mach). Zion::Zwgc::protect($tty)."\n"); 
 $_buffer_ .= join(" ", $time."]]\n"); 
} elsif(grep($_case_ eq $_,"wg_ctl_class")){
$emacs= $ENV{"EMACS"};
 if( ( $emacs ne "" ) ) {$ezwgc_term="\n";}{$ezwgc_term="";}
$zdebug= $ZVAR{"debug"};
$zpings=(  $ZVAR{"show-pings"} ne "" );
$zpingall=(  $ZVAR{"show-pings"} eq "ALL" );
$zignore=(  $ZVAR{"ignore"} ne "" );
$zignorecase=(  $ZVAR{"ignore"} eq "CASE" );
$zignoretot=(  $ZVAR{"ignore"} eq "TOTAL" );
$zsyslog= $ZVAR{"syslog-regexp"};
$style="info";
 if( ( $opcode eq "WG_STARTUP" ) ) {
($zclt) = @fields; 
 if( ( $zclt=~ m"Zwgc mark " ) ) {
$dummy= Zion::Zwgc::any(\$zclt, 0, length("Zwgc "));
}
 if( ( $zclt=~ m" now running..." ) ) {
$dummy= Zion::Zwgc::any(\$zclt, -length(" now running..."));
}
 $_buffer_ .= join(" ", "\@helvetica[\@c[\@large[ZWGC started...]]]\n\@small["); 
 $_buffer_ .= join(" ", "Zwgc client:      ".$zclt."\n"); 
$desc="\$Revision: 1.7 \$";
$dummy= Zion::Zwgc::any(\$desc, 0, length("\$Revision: "));
$dummy= Zion::Zwgc::any(\$desc, -length(" \$"));
 $_buffer_ .= join(" ", "Description file: rev. ".$desc."\n"); 
 if( ( $emacs ne "" ) ) {
 $_buffer_ .= join(" ", "EMACS Zwgc:       ".$emacs."\n"); 
}
 if( ( $zdebug ne "" ) ) {
 $_buffer_ .= join(" ", "Debug level:      ".$zdebug."\n"); 
}
 if( ( $zpings ) ) {
 $_buffer_ .= join(" ", "Showing pings:    ENABLED\n"); 
 if( ( $zpingall ) ) {
 $_buffer_ .= join(" ", "Ping selection:   ALL PINGS\n"); 
}{
 $_buffer_ .= join(" ", "Ping selection:   USER PINGS\n"); 
}
}
 if( ( $zignore ) ) {
 $_buffer_ .= join(" ", "\@-strings:        IGNORED"); 
 if( ( $zignorecase ) ) { $_buffer_ .= join(" ", " (case-by-case)"); 
} elsif( ( $zignoretot ) ) { $_buffer_ .= join(" ", " (completely)"); 
}{ $_buffer_ .= join(" ", " (quoted)"); }
 $_buffer_ .= join(" ", "\n"); 
}
 $_buffer_ .= join(" ", "Syslog filter:    ". Zion::Zwgc::verbatim($zsyslog)."\n"); 
 $_buffer_ .= join(" ", "]"); 
}{
 $_buffer_ .= join(" ", "WgCtl: opcode ".$opcode.", instance ".$instance."\n"); 
 $_buffer_ .= join(" ", "DEFAULT SAYS:\n". Zion::Zwgc::substitute($default)); 
}

# start of bert's private hacks, $Revision$

} elsif(grep($_case_ eq $_,"sipb.phone")){
($type,$msg) = @fields; 
$style="pong";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@large[SIPB ".$type."]\n"); 
 if( ( $sender ne "phone-broadcast\@sipb.mit.edu" ) ) {
 $_buffer_ .= join(" ", "Originator: ".$sender."\n"); 
}
 if( ( $auth ne "yes" ) ) {
 $_buffer_ .= join(" ", $aval."\n"); 
}
 $_buffer_ .= join(" ", "Type: ".$instance."\n"); 
 $_buffer_ .= join(" ", $msg); 
} elsif(grep($_case_ eq $_,"blood","warp-drive","bspd")){
$style="fun";
 $_buffer_ .= join(" ", "\@c[class \@b[". uc( Zion::Zwgc::any(\$class, 0, length(" "))).$class."]"); 
 $_buffer_ .= join(" ", ", instance \@b[". uc( Zion::Zwgc::any(\$instance, 0, length(" "))).$instance."]\n"); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
} elsif(grep($_case_ eq $_,"zsex","zsperry")){
$style="magic";
 $_buffer_ .= join(" ", "\@c[\@helvetica[\@b[".$class."], instance \@b[".$instance."]]\n"); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
# end of bert's private hacks


} else {
 $_buffer_ .= join(" ", "\@c[class \@b[". uc( Zion::Zwgc::any(\$class, 0, length(" "))).$class."]"); 
 $_buffer_ .= join(" ", ", instance \@b[". uc( Zion::Zwgc::any(\$instance, 0, length(" "))).$instance."]\n"); 
 $_buffer_ .= join(" ", $date.", ".$time."\n"); 
 $_buffer_ .= join(" ", "\@b[\@[". Zion::Zwgc::protect($sig)."] <". Zion::Zwgc::protect($sender).">]\n"); 
 $_buffer_ .= join(" ", "on ".$fromhost."]\n\n".$msg); 
}}

 if( ( $do_put ) ) {
 $_buffer_ .= join(" ", $ezwgc_term); 
 Zion::put($_buffer_); 
 if( ( ( $zdebug eq "PROTECT" )&&( $opcode eq "TEST" ) ) ) {
$style="system";
 print { $port{$output_driver}->[1] } join(" ", "RAW:\n". Zion::Zwgc::verbatim($fields[1])); 
 print { $port{$output_driver}->[1] } join(" ", "PROTECTED:\n". Zion::Zwgc::verbatim( Zion::Zwgc::protect($fields[1]))); 
}
}
$style="";
