From a45410768b1776c99d2af370b768d1179198a21c Mon Sep 17 00:00:00 2001 From: dms Date: Tue, 20 Feb 2001 12:58:43 +0000 Subject: [PATCH] - lobotomy warning now cached - use &mkcrypt() git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@406 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Process.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Process.pl b/src/Process.pl index 72f9888..69711c0 100644 --- a/src/Process.pl +++ b/src/Process.pl @@ -25,7 +25,9 @@ sub process { # check if we have our head intact. if ($lobotomized) { if ($addressed and IsFlag("o") eq "o") { - &msg($who, "give me an unlobotomy."); + my $delta_time = time() - ($cache{lobotomy}{$who} || 0); + &msg($who, "give me an unlobotomy.") if ($delta_time > 60*60); + $cache{lobotomy}{$who} = time(); } return 'LOBOTOMY'; } @@ -160,10 +162,9 @@ sub process { $users{$who}{HOSTS}{$mask} = 1; } - my $salt = join '',('.','/',0..9,'A'..'Z','a'..'z')[rand 64, rand 64]; - # todo: show crypt? - &pSReply("new pass for $who, salt $salt."); - $users{$who}{PASS} = crypt($array[0], $salt); + $crypt = &mkcrypt($array[0]); + $users{$who}{PASS} = $crypt; + &pSReply("new pass for $who, crypt $crypt."); return; } -- 2.39.2