diff options
| author | 2015-10-16 22:28:47 +0000 | |
|---|---|---|
| committer | 2015-10-16 22:28:47 +0000 | |
| commit | d65a352e918425b79f5bf0394072e303c6d1817b (patch) | |
| tree | dac9159a4f7b38e1bbf8868635915ab53f6eee43 /lib/ASM/Classes.pm | |
| parent | ce716dd32edf62c4b6d03a6b589f526a0d8ddffb (diff) | |
alleviate FPs on foolish floody humans
Try to avoid alerting a splitflood on stuff like "lol" said by various
human-looking beings and the like
Diffstat (limited to 'lib/ASM/Classes.pm')
| -rw-r--r-- | lib/ASM/Classes.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ASM/Classes.pm b/lib/ASM/Classes.pm index 1054f63..8c874b5 100644 --- a/lib/ASM/Classes.pm +++ b/lib/ASM/Classes.pm @@ -312,12 +312,12 @@ sub splitflood { $text=$event->{args}->[0]; } return unless defined($text); - # a bit ugly but this should avoid alerting on spammy bot commands + # a bit ugly but this should avoid false positives on foolish humans # give them the benefit of the doubt if they talked before ... but not too recently # if we didn't see them join, assume they did talk at some point my $msgtime = $::sc{$chan}{users}{lc $event->{nick}}{msgtime} // 0; $msgtime ||= 1 if !$::sc{$chan}{users}{lc $event->{nick}}{jointime}; - return if $text =~ /^[^\w\s]+\w+\s*$/ && $msgtime && ($msgtime + 2 * $cf{$id}{timeout}) < time; + return if $text =~ /^[^\w\s]+\w+\s*$/ && $msgtime && ($msgtime + $cf{$id}{timeout}) < time; # return unless length($text) >= 10; if (defined($bs{$id}{$text}) && (time <= $bs{$id}{$text} + 600)) { return 1; |
