increase interval between auto for/opers and add up to 9 days of randomi-
authorminima <minima>
Sun, 6 Jan 2002 18:11:48 +0000 (18:11 +0000)
committerminima <minima>
Sun, 6 Jan 2002 18:11:48 +0000 (18:11 +0000)
ness.

Changes
perl/DXCommandmode.pm
perl/DXMsg.pm
perl/DXUser.pm

diff --git a/Changes b/Changes
index 16d685079c60d72bb5c335e4ed646a70f64eba93..1b8b9351769bab538918893b0c1b0f0be99c762e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -8,6 +8,8 @@
 list of commands in "<cmd>") to a file.
 7. Add a new command "echo" which echos its argument to the screen (useful
 for titling in the save command above.
+8. Increase interval between logins causing for/opernam to 60 days (from 30)
++ a random factor between 0 and 9
 02Jan02=======================================================================
 1. updated the copyright dates
 2. modernised and extended the Windows instructions a bit.
index 4601ec21df0ca34d01ca99b7beb64f9f9996bdd8..d562437a6460d3ca380803db27784b3d2417ba15 100644 (file)
@@ -155,9 +155,9 @@ sub start
        # do we need to send a forward/opernam?
        my $lastoper = $user->lastoper || 0;
        my $homenode = $user->homenode || ""; 
-       if ($homenode eq $main::mycall && $lastoper + $DXUser::lastoperinterval < $main::systime) {
+       if ($homenode eq $main::mycall && $main::systime >= $lastoper + $DXUser::lastoperinterval) {
                run_cmd($main::me, "forward/opernam $call");
-               $user->lastoper($main::systime);
+               $user->lastoper($main::systime + ((int rand(10)) * 86400));
        }
 
        # run a script send the output to the punter
index bb80e6c1908183ffbb16bf027a34e76c30478243..ff9d45aaeb57ffbafe96d22effcb6c0a697fc69c 100644 (file)
@@ -724,7 +724,7 @@ sub queue_msg
                        $ref->stop_msg($node);
                        
                        # delay any outgoing messages that fail
-                       $ref->{waitt} = $main::systime + $waittime + rand(120) if $node ne $main::mycall;
+                       $ref->{waitt} = $main::systime + $waittime + int rand(120) if $node ne $main::mycall;
                        delete $ref->{lastt};
                        next;
                }
index b996e5c536bc6d377265cadbde0d8375a8f0bbea..bfc861de27271aaf7ee0c9cac912d3f41d11f24e 100644 (file)
@@ -28,7 +28,7 @@ use vars qw(%u $dbm $filename %valid $lastoperinterval $lasttime);
 %u = ();
 $dbm = undef;
 $filename = undef;
-$lastoperinterval = 30*24*60*60;
+$lastoperinterval = 60*24*60*60;
 $lasttime = 0;
 
 # hash of valid elements and a simple prompt