mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-26 20:52:37 +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:]])/) {
|
||||
my $separator = $1;
|
||||
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);
|
||||
eval {
|
||||
my $rx = qr/$regex/;
|
||||
|
Loading…
Reference in New Issue
Block a user