mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-28 05:32:48 +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;
|
||||
|
||||
if (defined $arguments) {
|
||||
if ($arguments =~ /^([^\s]+) ([^\s]+)\s+s(.)/) {
|
||||
$channel = $1;
|
||||
$keyword = $2;
|
||||
$delim = $3;
|
||||
$needs_disambig = 0;
|
||||
} elsif ($arguments =~ /^([^\s]+)\s+s(.)/) {
|
||||
if ($arguments =~ /^([^\s]+)\s+s(.)/) {
|
||||
$keyword = $1;
|
||||
$delim = $2;
|
||||
$channel = $from;
|
||||
$needs_disambig = 1;
|
||||
} elsif ($arguments =~ /^([^\s]+) ([^\s]+)\s+s(.)/) {
|
||||
$channel = $1;
|
||||
$keyword = $2;
|
||||
$delim = $3;
|
||||
$needs_disambig = 0;
|
||||
}
|
||||
|
||||
$delim = quotemeta $delim;
|
||||
|
||||
if ($arguments =~ /\Q$keyword\E s$delim(.*?)$delim(.*)$delim(.*)$/) {
|
||||
|
Loading…
Reference in New Issue
Block a user