sh/dx and sh/dxcc now fully implemented
[spider.git] / perl / DXM.pm
1 #
2 # DX cluster message strings for output
3 #
4 # Each message string will substitute $_[x] positionally. What this means is
5 # that if you don't like the order in which fields in each message is output then 
6 # you can change it. Also you can include various globally accessible variables
7 # in the string if you want. 
8 #
9 # Largely because I don't particularly want to have to change all these messages
10 # in every upgrade I shall attempt to add new field to the END of the list :-)
11 #
12 # Copyright (c) 1998 - Dirk Koopman G1TLH
13 #
14 # $Id$
15 #
16
17 package DXM;
18
19 require Exporter;
20 @ISA = qw(Exporter);
21 @EXPORT = qw(msg);
22
23 %msgs = (
24   addr => 'Address set to: $_[0]',
25   anns => 'Announce flag set on $_[0]',
26   annu => 'Announce flag unset on $_[0]',
27   conother => 'Sorry $_[0] you are connected on another port',
28   concluster => 'Sorry $_[0] you are already connected elsewhere on the cluster',
29   dxs => 'DX Spots flag set on $_[0]',
30   dxu => 'DX Spots flag unset on $_[0]',
31   e1 => 'Invalid command',
32   e2 => 'Error: $_[0]',
33   e3 => '$_[0]: $_[1] not found',
34   e4 => 'Need at least a prefix or callsign',
35   email => 'E-mail address set to: $_[0]',
36   heres => 'Here set on $_[0]',
37   hereu => 'Here unset on $_[0]',
38   homebbs => 'Home BBS set to: $_[0]',
39   homenode => 'Home Node set to: $_[0]',
40   l1 => 'Sorry $_[0], you are already logged on on another channel',
41   l2 => 'Hello $_[0], this is $main::mycall located in $main::myqth',
42   m2 => '$_[0] Information: $_[1]',
43   node => '$_[0] set as AK1A style Node',
44   nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line',
45   pr => '$_[0] de $main::mycall $main::cldate $main::ztime >',
46   prx => '$main::$mycall >',
47   talks => 'Talk flag set on $_[0]',
48   talku => 'Talk flag unset on $_[0]',
49   wwvs => 'WWV flag set on $_[0]',
50   wwvu => 'WWV flag unset on $_[0]',
51 );
52
53 sub msg
54 {
55   my $self = shift;
56   my $s = $msgs{$self};
57   return "unknown message '$self'" if !defined $s;
58   return  eval qq("$s");
59 }
60