3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

AntiTwitter: whoops

This commit is contained in:
Pragmatic Software 2019-12-30 02:05:55 -08:00
parent 341d5e7270
commit 5e40730f36

View File

@ -46,7 +46,7 @@ sub on_public {
$channel = lc $channel; $channel = lc $channel;
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel); return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel);
while ($msg =~ m/\B[@]*([a-z0-9_^{}\-\\\[\]\|]+)/ig) { while ($msg =~ m/\B[@]([a-z0-9_^{}\-\\\[\]\|]+)/ig) {
my $n = $1; my $n = $1;
if ($self->{pbot}->{nicklist}->is_present_similar($channel, $n, 0.05)) { if ($self->{pbot}->{nicklist}->is_present_similar($channel, $n, 0.05)) {
$self->{offenses}->{$channel}->{$nick}->{offenses}++; $self->{offenses}->{$channel}->{$nick}->{offenses}++;