3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-01-11 20:42:38 +01:00

AntiTwitter: Remove nick prefix from private messages

This commit is contained in:
Pragmatic Software 2019-12-30 02:01:04 -08:00
parent d2203db285
commit 341d5e7270

View File

@ -56,10 +56,10 @@ sub on_public {
given ($self->{offenses}->{$channel}->{$nick}->{offenses}) { given ($self->{offenses}->{$channel}->{$nick}->{offenses}) {
when (1) { when (1) {
$event->{conn}->privmsg($nick, "$nick: Please do not use \@nick to address people. Drop the @ symbol; it's not necessary and it's ugly."); $event->{conn}->privmsg($nick, "Please do not use \@nick to address people. Drop the @ symbol; it's not necessary and it's ugly.");
} }
when (2) { when (2) {
$event->{conn}->privmsg($nick, "$nick: Please do not use \@nick to address people. Drop the @ symbol; it's not necessary and it's ugly. Doing this again will result in a temporary ban."); $event->{conn}->privmsg($nick, "Please do not use \@nick to address people. Drop the @ symbol; it's not necessary and it's ugly. Doing this again will result in a temporary ban.");
} }
default { default {
my $offenses = $self->{offenses}->{$channel}->{$nick}->{offenses} - 2; my $offenses = $self->{offenses}->{$channel}->{$nick}->{offenses} - 2;
@ -67,7 +67,7 @@ sub on_public {
$self->{pbot}->{chanops}->ban_user_timed($self->{pbot}->{registry}->get_value('irc', 'botnick'), 'using @nick too much', "*!*\@$host", $channel, $length); $self->{pbot}->{chanops}->ban_user_timed($self->{pbot}->{registry}->get_value('irc', 'botnick'), 'using @nick too much', "*!*\@$host", $channel, $length);
$self->{pbot}->{chanops}->gain_ops($channel); $self->{pbot}->{chanops}->gain_ops($channel);
$length = duration $length; $length = duration $length;
$event->{conn}->privmsg($nick, "$nick: Please do not use \@nick to address people. Drop the @ symbol; it's not necessary and it's ugly. You were warned. You will be allowed to speak again in $length."); $event->{conn}->privmsg($nick, "Please do not use \@nick to address people. Drop the @ symbol; it's not necessary and it's ugly. You were warned. You will be allowed to speak again in $length.");
} }
} }
last; last;