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 {}