From de42067e2877bdcf0fe9fe2f9e5a21e414b643d2 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 7 Aug 2024 15:51:01 -0700 Subject: [PATCH] Plugin/AntiHello: update greeting regex --- lib/PBot/Plugin/AntiHello.pm | 4 ++-- lib/PBot/VERSION.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PBot/Plugin/AntiHello.pm b/lib/PBot/Plugin/AntiHello.pm index feb10003..d54919d9 100644 --- a/lib/PBot/Plugin/AntiHello.pm +++ b/lib/PBot/Plugin/AntiHello.pm @@ -14,7 +14,7 @@ use PBot::Imports; sub initialize($self, %conf) { $self->{pbot}->{registry}->add_default('text', 'antihello', 'bad_greetings', - $conf{bad_greetings} // '^\s*(?:[[:punct:]]|\p{Emoticons})*\s*(?:h*e+l+l+o+|h*e+n+l+o+|l+o+|hi+|g+r+e+t+s*z*|g+r+e+t+i+n+g+s*|h*o+l+a+|o+i+|h*e+y+|h+a+y+|o*h+a+i+)\s*(?:\s+.{1,10})?\s*(?:[[:punct:]]|\p{Emoticons})*\s*$' + $conf{bad_greetings} // '^\s*(?:[[:punct:]]|\p{Emoticons})*\s*(?:h*e+l+l+o+|h+e+y+a+|y+o+|h*e+n+l+o+|l+o+|h+i+|g+o+d+\s*(d+a+y+|m+o+r+n+i+n+g*|e+v+e+n+i+n+g*|a+f+t+e+r+n+o+n+|n+o+n+)|w*a*s+u+p+|g+[[:punct:]]*d+a+y+|g+r+e+t+s*z*|g+r+e+t+i+n+g+s*|h*o+l+a+|o+i+|h*e+y+|h+a+y+|o*h+a+i+)\s*(?:\s+.{1,10})?\s*(?:[[:punct:]]|\p{Emoticons})*\s*$' ); $self->{pbot}->{registry}->add_default('text', 'antihello', 'kick_msg', 'https://nohello.net/'); @@ -40,7 +40,7 @@ sub punish($self, $msg, $channel, $nick, $user, $host) { # just do a private warning message for the first offense my $now = time; - if ($now - $self->{last_warning} >= 60 * 15) { + if ($now - $self->{last_warning} >= 60 * 5) { $self->{last_warning} = $now; $self->{pbot}->{conn}->privmsg($channel, "Please do not send stand-alone channel greeting messages; include your question/statement along with the greeting. For more info, see https://nohello.net/ (repeated offenses will result in an automatic ban)"); } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 3b28cc33..be79f207 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4776, + BUILD_REVISION => 4777, BUILD_DATE => "2024-08-07", };