X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXM.pm;h=64602a2683b48bb634dd79078bc328e5b6257b9a;hb=b5b58db69484da5554b4f7e10b813d13e8cf16cb;hp=80b2fbc7bf8398b3ba8bffbe3f8fa281359ef7c4;hpb=07ea293f3919d2da76220b5fbc55b734008ed44c;p=spider.git diff --git a/perl/DXM.pm b/perl/DXM.pm index 80b2fbc7..64602a26 100644 --- a/perl/DXM.pm +++ b/perl/DXM.pm @@ -16,9 +16,7 @@ package DXM; -require Exporter; -@ISA = qw(Exporter); -@EXPORT = qw(msg); +use DXVars; %msgs = ( addr => 'Address set to: $_[0]', @@ -31,6 +29,8 @@ require Exporter; e1 => 'Invalid command', e2 => 'Error: $_[0]', e3 => '$_[0]: $_[1] not found', + e4 => 'Need at least a prefix or callsign', + e5 => 'Not Allowed', email => 'E-mail address set to: $_[0]', heres => 'Here set on $_[0]', hereu => 'Here unset on $_[0]', @@ -39,7 +39,10 @@ require Exporter; l1 => 'Sorry $_[0], you are already logged on on another channel', l2 => 'Hello $_[0], this is $main::mycall located in $main::myqth', m2 => '$_[0] Information: $_[1]', + node => '$_[0] set as AK1A style Node', + nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line', pr => '$_[0] de $main::mycall $main::cldate $main::ztime >', + priv => 'Privilege level changed on $_[0]', prx => '$main::$mycall >', talks => 'Talk flag set on $_[0]', talku => 'Talk flag unset on $_[0]', @@ -52,6 +55,8 @@ sub msg my $self = shift; my $s = $msgs{$self}; return "unknown message '$self'" if !defined $s; - return eval qq("$s"); + my $ans = eval qq{ "$s" }; + confess $@ if $@; + return $ans; }