From 1e004d22dbccdfff4d8cce8a4c12bd0fe6a49a81 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 3 Jan 2018 20:32:56 +1300 Subject: Add option to disable antiflood --- config_file.pm | 3 ++- plugin/antiflood.pm | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config_file.pm b/config_file.pm index feb2c9f..2ad6620 100644 --- a/config_file.pm +++ b/config_file.pm @@ -21,7 +21,8 @@ sub parse_config 'user', 'group', 'url_on', - 'url_len'); + 'url_len', + 'antiflood_on'); my @list_configs = ( 'channels', 'ignore', diff --git a/plugin/antiflood.pm b/plugin/antiflood.pm index a4fe09c..7eb5b7f 100644 --- a/plugin/antiflood.pm +++ b/plugin/antiflood.pm @@ -24,6 +24,8 @@ sub message { my $channel = $where->[0]; my $nick = (split /!/, $who)[0]; + return if ($config{antiflood_on} == 0); + my $now = time(); push @{$lastmsg{$nick}}, $now; -- cgit v1.1