mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-17 01:19:31 +01:00
Plugin/AntiHello: update regex
This commit is contained in:
parent
2c7dcafba5
commit
f2068a4baf
@ -14,7 +14,7 @@ use PBot::Imports;
|
|||||||
|
|
||||||
sub initialize($self, %conf) {
|
sub initialize($self, %conf) {
|
||||||
$self->{pbot}->{registry}->add_default('text', 'antihello', 'bad_greetings',
|
$self->{pbot}->{registry}->add_default('text', 'antihello', 'bad_greetings',
|
||||||
$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*[[:punct:]]*\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+|b+r+o+s*|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*[[:punct:]]*\s*(?:\s+.{1,15})?\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*[[:punct:]]*\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+|l+a+d+s*|b+r+o+s*|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*[[:punct:]]*\s*(?:\s+.{1,15})?\s*(?:[[:punct:]]|\p{Emoticons})*\s*$'
|
||||||
);
|
);
|
||||||
|
|
||||||
$self->{pbot}->{registry}->add_default('text', 'antihello', 'kick_msg', 'https://nohello.net/');
|
$self->{pbot}->{registry}->add_default('text', 'antihello', 'kick_msg', 'https://nohello.net/');
|
||||||
@ -61,7 +61,7 @@ sub punish($self, $msg, $channel, $nick, $user, $host) {
|
|||||||
if ($data->{offenses} == 1) {
|
if ($data->{offenses} == 1) {
|
||||||
my $now = time;
|
my $now = time;
|
||||||
|
|
||||||
# send public message to channel with 5 minute cooldown
|
# send public message to channel with cooldown
|
||||||
if ($now - $self->{last_warning} >= 60 * 60) {
|
if ($now - $self->{last_warning} >= 60 * 60) {
|
||||||
$self->{last_warning} = $now;
|
$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)");
|
$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
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4812,
|
BUILD_REVISION => 4813,
|
||||||
BUILD_DATE => "2024-10-25",
|
BUILD_DATE => "2024-10-25",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user