mirror of
https://github.com/pragma-/pbot.git
synced 2025-05-08 07:37:35 +02:00
Don't show regex escapes in factfind output
This commit is contained in:
parent
ec6f146fa6
commit
c1f87bf177
@ -633,7 +633,7 @@ sub factfind {
|
|||||||
my $factoids = $self->{pbot}->factoids->factoids->hash;
|
my $factoids = $self->{pbot}->factoids->factoids->hash;
|
||||||
|
|
||||||
if(not defined $arguments) {
|
if(not defined $arguments) {
|
||||||
return "/msg $nick Usage: !find [-channel channel] [-owner nick] [-by nick] [text]";
|
return "/msg $nick Usage: factfind [-channel channel] [-owner nick] [-by nick] [text]";
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($channel, $owner, $by);
|
my ($channel, $owner, $by);
|
||||||
@ -664,10 +664,13 @@ sub factfind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($arguments ne "") {
|
if($arguments ne "") {
|
||||||
|
my $unquoted_args = $arguments;
|
||||||
|
$unquoted_args =~ s/(?:\\(?!\\))//g;
|
||||||
|
$unquoted_args =~ s/(?:\\\\)/\\/g;
|
||||||
if(not defined $argtype) {
|
if(not defined $argtype) {
|
||||||
$argtype = "with text containing '$arguments'";
|
$argtype = "with text containing '$unquoted_args'";
|
||||||
} else {
|
} else {
|
||||||
$argtype .= " and with text containing '$arguments'";
|
$argtype .= " and with text containing '$unquoted_args'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 499,
|
BUILD_REVISION => 500,
|
||||||
BUILD_DATE => "2014-03-04",
|
BUILD_DATE => "2014-03-04",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user