From 4510d83153715660e56436bb56845630bf3daad9 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 15 May 2015 17:51:50 -0700 Subject: [PATCH] `unbanme` now only works for the first offense However, the 2nd offense now only earns a 1 hour ban to make up for this. --- PBot/AntiFlood.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index 0c50164f..75559aaa 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -57,7 +57,7 @@ sub initialize { $self->{pbot}->{registry}->add_default('text', 'antiflood', 'join_flood_threshold', $conf{join_flood_threshold} // 4); $self->{pbot}->{registry}->add_default('text', 'antiflood', 'join_flood_time_threshold', $conf{join_flood_time_threshold} // 60 * 30); - $self->{pbot}->{registry}->add_default('array', 'antiflood', 'join_flood_punishment', $conf{join_flood_punishment} // '28800,86400,604800,2419200,14515200'); + $self->{pbot}->{registry}->add_default('array', 'antiflood', 'join_flood_punishment', $conf{join_flood_punishment} // '28800,3600,86400,604800,2419200,14515200'); $self->{pbot}->{registry}->add_default('text', 'antiflood', 'chat_flood_threshold', $conf{chat_flood_threshold} // 4); $self->{pbot}->{registry}->add_default('text', 'antiflood', 'chat_flood_time_threshold', $conf{chat_flood_time_threshold} // 10); @@ -478,8 +478,8 @@ sub unbanme { } my $channel_data = $self->{pbot}->{messagehistory}->{database}->get_channel_data($message_account, $channel, 'offenses'); - if($channel_data->{offenses} > 2) { - return "/msg $nick You may only use unbanme for the first two offenses. You will be automatically unbanned in a few hours, and your offense counter will decrement once every 24 hours."; + if($channel_data->{offenses} > 1) { + return "/msg $nick You may only use unbanme for the first offense. You will be automatically unbanned in a few hours, and your offense counter will decrement once every 24 hours."; } $self->{pbot}->{chanops}->unban_user($mask, $channel);