summaryrefslogtreecommitdiffstats
path: root/lib/ASM/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ASM/Util.pm')
-rw-r--r--lib/ASM/Util.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ASM/Util.pm b/lib/ASM/Util.pm
index 6372037..4b0137d 100644
--- a/lib/ASM/Util.pm
+++ b/lib/ASM/Util.pm
@@ -131,6 +131,15 @@ sub mayAlert {
return !( ($::channels->{channel}{lc $chan}{monitor} // 'yes') eq 'no' || $module->isSuppressed($chan) );
}
+sub isFloodedPhraseOK {
+ my ($module, $chan, $text) = @_;
+
+ return undef unless exists $::channels->{channel}{$chan}{floodedphraseok};
+ my $exempt_regex = $::channels->{channel}{$chan}{floodedphraseok};
+
+ return $text =~ $exempt_regex;
+}
+
#this item is a stub, dur
sub hostip {
return gethostbyname($_[0]);