#
# Copyright (c) 1998 Dirk Koopman G1TLH
#
-# $Id$
+#
#
#
# Notes for implementors:-
use strict;
-use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
use vars qw(%work @msg $msgdir %valid %busy $maxage $last_clean $residencetime
@badmsg @swop $swopfn $badmsgfn $forwardfn @forward $timeout $waittime
$email_server $email_prog $email_from
$self->{gotit} = [];
# $self->{lastt} = $main::systime;
$self->{lines} = [];
- $self->{private} = 1 if $bulltopriv && DXUser->get_current($self->{to});
+ $self->{private} = 1 if $bulltopriv && DXUser::get_current($self->{to});
return $self;
}
$ref->{lastt} = $main::systime;
# look to see whether this is a non private message sent to a known callsign
- my $uref = DXUser->get_current($ref->{to});
+ my $uref = DXUser::get_current($ref->{to});
if (is_callsign($ref->{to}) && !$ref->{private} && $uref && $uref->homenode) {
$ref->{private} = 1;
dbg("set bull to $ref->{to} to private") if isdbg('msg');
my $ref = get_fwq($fromnode, $stream);
if ($ref) {
- $_[4] =~ s/\%5E/^/g;
+ $_[4] =~ s/\%5E/~/g;
if (@{$ref->{lines}}) {
push @{$ref->{lines}}, $_[4];
} else {
}
# check the message for bad words
+ my @bad;
my @words;
+ @bad = BadWords::check($ref->{subject});
+ push @words, [$ref->{subject}, @bad] if @bad;
for (@{$ref->{lines}}) {
- push @words, BadWords::check($_);
+ @bad = BadWords::check($_);
+ push @words, [$_, @bad] if @bad;
}
- push @words, BadWords::check($ref->{subject});
if (@words) {
- dbg("$ref->{from} swore: '@words' -> $ref->{to} '$ref->{subject}' origin: $ref->{origin} via " . $dxchan->call) if isdbg('msg');
- Log('msg',"$ref->{from} swore: '@words' -> $ref->{to} origin: $ref->{origin} via " . $dxchan->call);
- Log('msg',"subject: $ref->{subject}");
- for (@{$ref->{lines}}) {
- Log('msg', "line: $_");
+ LogDbg('msg',"$ref->{from} swore: $ref->{to} origin: $ref->{origin} via " . $dxchan->call);
+ LogDbg('msg',"subject: $ref->{subject}");
+ for (@words) {
+ my $r = $_;
+ my $line = shift @$r;
+ LogDbg('msg', "line: $line (using words: ". join(',', @$r).")");
}
$ref->stop_msg($fromnode);
return;
{
my $ref = shift;
my $to = $ref->{to};
- my $uref = DXUser->get_current($to);
+ my $uref = DXUser::get_current($to);
my $dxchan = DXChannel::get($to);
if (((*Net::SMTP && $email_server) || $email_prog) && $uref && $uref->wantemail) {
my $email = $uref->email;
if ($dxchan) {
if ($dxchan->is_node) {
next if $clref->call eq $main::mycall; # i.e. it lives here
+ next if $dxchan->is_arcluster; # don't even go there, idiot people send the header in the wrong order and won't/can't fix it
+ next if $dxchan->isolate; # there is no mechanism for sending messages to isolated nodes.
$ref->start_msg($dxchan) if !get_busy($dxchan->call) && $dxchan->state eq 'normal';
}
} else {
next unless $call;
next if $call eq $main::mycall;
next if ref $ref->{gotit} && grep $_ eq $call, @{$ref->{gotit}};
- next unless $ref->forward_it($call); # check the forwarding file
- next if $ref->{tonode}; # ignore it if it already being processed
+ next unless $ref->forward_it($call); # check the forwarding file
+ next if $ref->{tonode}; # ignore it if it already being processed
+ next if $dxchan->is_arcluster; # don't even go there, idiot people send the header in the wrong order and won't/can't fix it
+ next if $dxchan->isolate; # there is no mechanism for sending messages to isolated nodes.
# if we are here we have a node that doesn't have this message
if (!get_busy($call) && $dxchan->state eq 'normal') {
$ref->notify;
}
} else {
- Log('msg', $self->call . " swore to @{$loc->{to}} subject: '$loc->{subject}' in msg, REJECTED");
+ LogDbg('msg', $self->call . " swore to @{$loc->{to}} subject: '$loc->{subject}' in msg, REJECTED");
}
delete $loc->{lines};