mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
Plugin/AntiHello: update greeting regex
This commit is contained in:
parent
1986da2a4b
commit
de42067e28
@ -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)");
|
||||
}
|
||||
|
@ -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",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user