mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 05:49:27 +01:00
Plugins/TypoSub: allow, but ignore, trailing characters after a s/// closed sub
This commit is contained in:
parent
165099b035
commit
d92f690195
@ -57,7 +57,7 @@ sub on_public {
|
|||||||
if ($msg =~ m/^\s*s([[:punct:]])/) {
|
if ($msg =~ m/^\s*s([[:punct:]])/) {
|
||||||
my $separator = $1;
|
my $separator = $1;
|
||||||
my $sep = quotemeta $separator;
|
my $sep = quotemeta $separator;
|
||||||
if ($msg =~ m/^\s*s${sep}(.*?)(?<!\\)${sep}(.*?)(?<!\\)${sep}([g]*)\s*$/ or $msg =~ m/^\s*s${sep}(.*?)(?<!\\)${sep}(.*?)$/) {
|
if ($msg =~ m/^\s*s${sep}(.*?)(?<!\\)${sep}(.*?)(?<!\\)${sep}([g]*).*$/ or $msg =~ m/^\s*s${sep}(.*?)(?<!\\)${sep}(.*)$/) {
|
||||||
my ($regex, $replacement, $modifiers) = ($1, $2, $3);
|
my ($regex, $replacement, $modifiers) = ($1, $2, $3);
|
||||||
eval {
|
eval {
|
||||||
my $rx = qr/$regex/;
|
my $rx = qr/$regex/;
|
||||||
|
Loading…
Reference in New Issue
Block a user