Make AntiTwitter more robust

This commit is contained in:
Pragmatic Software 2017-02-22 12:09:06 -08:00
parent 0685843e3f
commit 75ca6d61a8
1 changed files with 2 additions and 2 deletions

View File

@ -40,9 +40,9 @@ sub on_public {
$channel = lc $channel;
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel);
while ($msg =~ m/@([^,;: ]+)/g) {
while ($msg =~ m/@([a-z0-9_^{}\-\\\[\]\|]+)/g) {
my $n = $1;
if ($self->{pbot}->{nicklist}->is_present($channel, $n)) {
if ($self->{pbot}->{nicklist}->is_present_similar($channel, $n)) {
$self->{offenses}->{$channel}->{$nick}->{offenses}++;
$self->{offenses}->{$channel}->{$nick}->{time} = gettimeofday;