started to flesh some of it out.
[spider.git] / perl / DXM.pm
1 #
2 # DX cluster message strings for output
3 #
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
5 #
6 # $Id$
7 #
8
9 package DXM;
10
11 require Exporter;
12 @ISA = qw(Exporter);
13 @EXPORT = qw(m);
14
15 %msgs = (
16   l1 => "Sorry $a[0], you are already logged on on another channel",
17   l2 => "Hello $a[0], this is $a[1] located in $a[2]",
18 );
19
20 sub m
21 {
22   my $self = shift;
23   local @a = @_;
24   my $s = $msg{$self};
25   return "unknown message '$self'" if !defined $s;
26   return eval $s;
27 }
28