3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

Commands/Factoids: factchange: handle escaped delimiters

This commit is contained in:
Pragmatic Software 2023-02-23 13:16:17 -08:00
parent 8d5b992b4c
commit 13b09be29a
2 changed files with 4 additions and 4 deletions

View File

@ -1254,11 +1254,11 @@ sub cmd_factchange {
if (defined $sub) {
$delim = quotemeta $delim;
if ($sub =~ /^s$delim(.*?)$delim(.*)$delim(.*)$/) {
if ($sub =~ /^s(?<!\\)$delim(.*?)(?<!\\)$delim(.*)(?<!\\)$delim(.*)$/) {
$tochange = $1;
$changeto = $2;
$modifier = $3;
} elsif ($sub =~ /^s$delim(.*?)$delim(.*)$/) {
} elsif ($sub =~ /^s(?<!\\)$delim(.*?)(?<!\\)$delim(.*)$/) {
$tochange = $1;
$changeto = $2;
$modifier = '';

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4622,
BUILD_DATE => "2023-02-20",
BUILD_REVISION => 4623,
BUILD_DATE => "2023-02-23",
};
sub initialize {}