summaryrefslogtreecommitdiff
path: root/lib/Multi/IRC.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-13 10:05:22 +0100
committerYorhel <git@yorhel.nl>2009-11-13 10:21:45 +0100
commit8053d00b0c9efa9bf1a7b176dcb8d9c106c1ee0d (patch)
treeade22d4bfec0f70b3561ef5fe22311e7a75536df /lib/Multi/IRC.pm
parent511c34e3ae8cd9d0f836fc9c745b1011bc731863 (diff)
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.
Diffstat (limited to 'lib/Multi/IRC.pm')
-rw-r--r--lib/Multi/IRC.pm4
1 files changed, 2 insertions, 2 deletions
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);
}