From 8053d00b0c9efa9bf1a7b176dcb8d9c106c1ee0d Mon Sep 17 00:00:00 2001 From: Yorhel Date: Fri, 13 Nov 2009 10:05:22 +0100 Subject: Multi::IRC: Tweaked the idlequote timings She shouldn't spam a quote more than once every 48 hours per channel now. Also decreased the actual idle timeout, so that the channel doesn't have to be idle for that long. --- lib/Multi/IRC.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Multi/IRC.pm') diff --git a/lib/Multi/IRC.pm b/lib/Multi/IRC.pm index 462cd515..7d74ded7 100644 --- a/lib/Multi/IRC.pm +++ b/lib/Multi/IRC.pm @@ -249,8 +249,8 @@ sub command { # mask, dest, msg sub idlequote { for (keys %{$_[HEAP]{idlequotes}}) { next if --$_[HEAP]{idlequotes}{$_} > 0; - $_[KERNEL]->yield(cmd_quote => '', [$_]) if $_[HEAP]{idlequotes}{$_} == 0; - $_[HEAP]{idlequotes}{$_} = int(120+rand(600)); + $_[KERNEL]->yield(cmd_quote => '', [$_]) if $_[HEAP]{idlequotes}{$_} == 0 && !throttle $_[HEAP], "idlequote_$_", 48*3600; + $_[HEAP]{idlequotes}{$_} = int(60+rand(300)); } $_[KERNEL]->delay(idlequote => 60); } -- cgit v1.2.3