## NOTE: this file has been machine-generated.  It's ugly.  So?  =)

use lib '/afs/sipb.mit.edu/user/bert/dev/zion';
use Zion::Zwgc 0.01;

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

 if( (  uc($opcode) eq "PING" ) ) 
{exit;}

{
  my $_case_ = $auth;
  if (0) {}		# thus, every "match" is an elsif

 elsif(grep($_case_ eq $_,"yes")){$aval="Authentic";}
 elsif(grep($_case_ eq $_,"no","forged")){$aval="\@b(\@large(UNAUTHENTIC))";}
}
{
  my $_case_ = $class;
  if (0) {}		# thus, every "match" is an elsif

 elsif(grep($_case_ eq $_,"WG_CTL_CLASS")){exit;}
 elsif(grep($_case_ eq $_,"message")){{
  my $_case_ = $instance;
  if (0) {}		# thus, every "match" is an elsif

 elsif(grep($_case_ eq $_,"PERSONAL")){$type="Personal";}
 elsif(grep($_case_ eq $_,"URGENT")){$type="Urgent";}
 else {$type="Instance ".$instance;}
}($signature,$body) = @fields; if( ( $body eq "" ) ) 
{$body=$signature;$signature="";}
 if( ( $signature=~ m"^[Ff]rom: .*" ) ) 
{$dummy= Zion::Zwgc::any(\$signature, 0, length("From: "));}
 if( ( $signature=~ m"\n\$" ) ) 
{$dummy= Zion::Zwgc::any(\$signature, -length("\n"));}
 if( ( $signature eq "" ) ) 
{$ftext="From: \@bold(". Zion::Zwgc::protect($sender).")";}
{$ftext="From: \@bold(". Zion::Zwgc::protect($signature)." <". Zion::Zwgc::protect($sender).">)";}
$_buffer_ .= join("", "\@center(\@bold(".$aval.") ".$type." message at ".$time." on ".$date."\n".$ftext." on ".$fromhost."\nTo: ".$recipient.")\n\n");$_buffer_ .= join("", $body); Zion::put($_buffer_);exit;}
 elsif(grep($_case_ eq $_,"login")){{
  my $_case_ = $opcode;
  if (0) {}		# thus, every "match" is an elsif

 elsif(grep($_case_ eq $_,"USER_LOGIN")){$log="logged in";}
 elsif(grep($_case_ eq $_,"USER_LOGOUT")){$log="logged out";}
 else {$log="unknown opcode";}
}($host,$when,$tty) = @fields;$_buffer_ .= join("", "\@center(\@bold(".$sender.") ".$log.")\n");$_buffer_ .= join("", "\@center(on \@bold(".$host.") on ".$tty.")\n");$_buffer_ .= join("", "\@center(at ".$when.")"); Zion::put($_buffer_);exit;}
 else {$_buffer_ .= join("", "(Authentication: \@bold(".$aval.") from host: ".$fromhost.")\n");$_buffer_ .= join("",  Zion::Zwgc::substitute($default)); Zion::put($_buffer_);exit;}
}
