3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-10-14 15:07:22 +02:00

BanList: ensure !ban/!mute mask is wildcard-complete when appropriate

This commit is contained in:
Pragmatic Software 2020-06-13 13:22:44 -07:00
parent c952a84d82
commit a412c98ea9

View File

@ -524,12 +524,16 @@ sub nick_to_banmask {
} }
} }
if ($mask !~ /!/) { # make sure $mask always has full wildcards
$mask .= '!*@*'; # there's probably a better way to do this...
} elsif ($mask !~ /@/) { if ($mask !~ /^\$/) {
$mask =~ s/\*?$/*@*/; if ($mask !~ /!/) {
} else { $mask .= '!*@*';
$mask =~ s/\@$/@*/; } elsif ($mask !~ /@/) {
$mask =~ s/\*?$/*@*/;
} else {
$mask =~ s/\@$/@*/;
}
} }
return $mask; return $mask;