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:
parent
c952a84d82
commit
a412c98ea9
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user