mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
FactoidCommands: fix an issue where factchange could sometimes fail
This commit is contained in:
parent
be0c487694
commit
7523fbcede
@ -1468,18 +1468,17 @@ sub factchange {
|
|||||||
my $needs_disambig;
|
my $needs_disambig;
|
||||||
|
|
||||||
if (defined $arguments) {
|
if (defined $arguments) {
|
||||||
if ($arguments =~ /^([^\s]+) ([^\s]+)\s+s(.)/) {
|
if ($arguments =~ /^([^\s]+)\s+s(.)/) {
|
||||||
$channel = $1;
|
|
||||||
$keyword = $2;
|
|
||||||
$delim = $3;
|
|
||||||
$needs_disambig = 0;
|
|
||||||
} elsif ($arguments =~ /^([^\s]+)\s+s(.)/) {
|
|
||||||
$keyword = $1;
|
$keyword = $1;
|
||||||
$delim = $2;
|
$delim = $2;
|
||||||
$channel = $from;
|
$channel = $from;
|
||||||
$needs_disambig = 1;
|
$needs_disambig = 1;
|
||||||
|
} elsif ($arguments =~ /^([^\s]+) ([^\s]+)\s+s(.)/) {
|
||||||
|
$channel = $1;
|
||||||
|
$keyword = $2;
|
||||||
|
$delim = $3;
|
||||||
|
$needs_disambig = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$delim = quotemeta $delim;
|
$delim = quotemeta $delim;
|
||||||
|
|
||||||
if ($arguments =~ /\Q$keyword\E s$delim(.*?)$delim(.*)$delim(.*)$/) {
|
if ($arguments =~ /\Q$keyword\E s$delim(.*?)$delim(.*)$delim(.*)$/) {
|
||||||
|
Loading…
Reference in New Issue
Block a user