ve7cc => '0,VE7CC program special,yesno',
lastmsgpoll => '0,Last Msg Poll,atime',
inscript => '9,In a script,yesno',
+ handle_xml => '9,Handles XML,yesno',
inqueue => '9,Input Queue,parray',
);
return $channels{$call} = $self;
}
+# rebless this channel as something else
+sub rebless
+{
+ my $self = shift;
+ my $class = shift;
+ return $channels{$self->{call}} = bless $self, $class;
+}
+
sub rec
{
my ($self, $msg) = @_;
}
}
-# obtain a channel object by callsign [$obj = DXChannel->get($call)]
+# obtain a channel object by callsign [$obj = DXChannel::get($call)]
sub get
{
- my ($pkg, $call) = @_;
+ my $call = shift;
return $channels{$call};
}
return unless $conn;
my $call = $self->{call};
- for (@_) {
-# chomp;
- my @lines = split /\n/;
- for (@lines) {
- $conn->send_later("D$call|$_");
- dbg("-> D $call $_") if isdbg('chan');
+ foreach my $l (@_) {
+ for (ref $l ? @$l : $l) {
+ my @lines = split /\n/;
+ for (@lines) {
+ $conn->send_later("D$call|$_");
+ dbg("-> D $call $_") if isdbg('chan');
+ }
}
}
- $self->{t} = time;
+ $self->{t} = $main::systime;
}
# send a file (always later)