X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXMsg.pm;h=3ea3211542a9cd80e4c1956833730b67a680d5de;hb=dbf7523a9b228dbdf1d03109afde351b8b194fab;hp=ff9d45aaeb57ffbafe96d22effcb6c0a697fc69c;hpb=aac4d7dbc1d3c34bf73147a679673d346894984f;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index ff9d45aa..3ea32115 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -34,7 +34,7 @@ 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; +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); $main::build += $VERSION; $main::branch += $BRANCH; @@ -435,7 +435,7 @@ sub notify { my $ref = shift; my $to = $ref->{to}; - my $uref = DXUser->get($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; @@ -518,7 +518,7 @@ sub store my $line; $ref->{size} = 0; foreach $line (@{$lines}) { - $line =~ s/[\x00-\x08\x0a-\x1f\xf0-\xff]/./g; + $line =~ s/[\x00-\x08\x0a-\x1f\x80-\x9f]/./g; $ref->{size} += (length $line) + 1; print $fh "$line\n"; } @@ -1086,6 +1086,24 @@ sub do_send_stuff delete $self->{loc}; $self->func(undef); $self->state('prompt'); + } elsif ($line =~ m|^/+\w+|) { + # this is a command that you want display for your own reference + # or if it has TWO slashes is a command + $line =~ s|^/||; + my $store = $line =~ s|^/+||; + my @in = $self->run_cmd($line); + push @out, @in; + if ($store) { + foreach my $l (@in) { + if (my @ans = BadWords::check($l)) { + $self->{badcount} += @ans; + Log('msg', $self->call . " used badwords: @ans to @{$loc->{to}} subject: '$loc->{subject}' in msg") unless $loc->{reject}; + Log('msg', "line: $l"); + $loc->{reject}++; + } + push @{$loc->{lines}}, length($l) > 0 ? $l : " "; + } + } } else { if (my @ans = BadWords::check($line)) { $self->{badcount} += @ans;