27Jun01=======================================================================
1. try adding an ARC mail hack
+2. slug the not here messages so they can't loopback
25Jun01=======================================================================
1. added automatic 'not here' message
21Jun01=======================================================================
use Internet;
use strict;
-use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors);
+use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug);
%Cache = (); # cache of dynamically loaded routine's mod times
%cmd_cache = (); # cache of short names
$dxchan->t($t);
}
}
+
+ while (my ($k, $v) = each %nothereslug) {
+ if ($main::systime >= $v + 300) {
+ delete $nothereslug{$k};
+ }
+ }
}
#
Log('talk', $to, $from, $main::mycall, $line);
# send a 'not here' message if required
unless ($self->{here} && $from ne $to) {
- my ($ref, $dxchan);
- if (($ref = Route::get($from)) && ($dxchan = $ref->dxchan)) {
- my $name = $self->user->name || $to;
- my $s = $self->user->nothere || $dxchan->msg('nothere', $name);
- $dxchan->talk($to, $from, undef, $s);
+ my $key = "$to$from";
+ unless (exists $nothereslug{$key}) {
+ my ($ref, $dxchan);
+ if (($ref = Route::get($from)) && ($dxchan = $ref->dxchan)) {
+ my $name = $self->user->name || $to;
+ my $s = $self->user->nothere || $dxchan->msg('nothere', $name);
+ $nothereslug{$key} = $main::systime;
+ $dxchan->talk($to, $from, undef, $s);
+ }
}
}
}