From 002f7a23d12252cf26615a6b8915d08977e223fa Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 8 Sep 2024 17:17:47 -0700 Subject: [PATCH] Plugin/AntiHello: always send private message warning --- lib/PBot/Plugin/AntiHello.pm | 5 +++++ lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/PBot/Plugin/AntiHello.pm b/lib/PBot/Plugin/AntiHello.pm index 920807e9..67907c4c 100644 --- a/lib/PBot/Plugin/AntiHello.pm +++ b/lib/PBot/Plugin/AntiHello.pm @@ -40,10 +40,15 @@ sub punish($self, $msg, $channel, $nick, $user, $host) { # just do a private warning message for the first offense my $now = time; + # send public message to channel with 5 minute cooldown 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)"); } + + # always send private message to offender + $self->{pbot}->{conn}->privmsg($nick, "($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)"); + return 0; } elsif ($self->{offense_counter}->{$channel}->{$nick} == 2) { $msg .= ' (2ND OFFENSE WARNING: next offense will result in a temp-ban)'; diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 015b7b2f..e9af0910 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4781, - BUILD_DATE => "2024-08-17", + BUILD_REVISION => 4783, + BUILD_DATE => "2024-09-08", }; sub initialize {}