3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-04-01 13:27:10 +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,6 +524,9 @@ sub nick_to_banmask {
} }
} }
# make sure $mask always has full wildcards
# there's probably a better way to do this...
if ($mask !~ /^\$/) {
if ($mask !~ /!/) { if ($mask !~ /!/) {
$mask .= '!*@*'; $mask .= '!*@*';
} elsif ($mask !~ /@/) { } elsif ($mask !~ /@/) {
@ -531,6 +534,7 @@ sub nick_to_banmask {
} else { } else {
$mask =~ s/\@$/@*/; $mask =~ s/\@$/@*/;
} }
}
return $mask; return $mask;
} }