use DXM;
use DXUtil;
use DXDebug;
+use Filter;
use Carp;
use strict;
annfilter => '5,Announce Filter',
wwvfilter => '5,WWV Filter',
spotfilter => '5,Spot Filter',
+ inannfilter => '5,Input Ann Filter',
+ inwwvfilter => '5,Input WWV Filter',
+ inspotfilter => '5,Input Spot Filter',
passwd => '9,Passwd List,parray',
+ pingint => '9,Ping Interval ',
+ nopings => '9,Ping Obs Count',
+ lastping => '9,Ping last sent,atime',
+ pingrec => '9,Pings no rec',
+ pingtime => '9,Ping totaltime',
+ pingave => '0,Ping ave time',
);
# object destruction
undef $self->{annfilter};
undef $self->{wwvfilter};
undef $self->{spotfilter};
+ undef $self->{inannfilter};
+ undef $self->{inwwvfilter};
+ undef $self->{inspotfilter};
undef $self->{passwd};
}
$self->{oldstate} = 0;
$self->{lang} = $main::lang if !$self->{lang};
$self->{func} = "";
+
+ # get the filters
+ $self->{spotfilter} = Filter::read_in('spots', $call, 0);
+ $self->{wwvfilter} = Filter::read_in('wwv', $call, 0);
+ $self->{annfilter} = Filter::read_in('ann', $call, 0);
+
bless $self, $pkg;
return $channels{$call} = $self;
}
delete $channels{$self->{call}};
}
+# is it a bbs
+sub is_bbs
+{
+ my $self = shift;
+ return $self->{sort} eq 'B';
+}
+
# is it an ak1a cluster ?
sub is_ak1a
{
{
my $self = shift;
my $conn = $self->{conn};
+ return unless $conn;
my $sort = shift;
my $call = $self->{call};
for (@_) {
chomp;
- $conn->send_now("$sort$call|$_") if $conn;
- dbg('chan', "-> $sort $call $_") if $conn;
+ my @lines = split /\n/;
+ for (@lines) {
+ $conn->send_now("$sort$call|$_");
+ dbg('chan', "-> $sort $call $_");
+ }
}
$self->{t} = time;
}
{
my $self = shift;
my $conn = $self->{conn};
+ return unless $conn;
my $call = $self->{call};
for (@_) {
chomp;
- $conn->send_later("D$call|$_") if $conn;
- dbg('chan', "-> D $call $_") if $conn;
+ my @lines = split /\n/;
+ for (@lines) {
+ $conn->send_later("D$call|$_");
+ dbg('chan', "-> D $call $_");
+ }
}
$self->{t} = time;
}