3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-04 18:38:47 +02:00

Don't show regex escapes in factfind output

This commit is contained in:
Pragmatic Software 2014-03-04 10:48:08 +00:00
parent ec6f146fa6
commit c1f87bf177
2 changed files with 7 additions and 4 deletions

View File

@ -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'";
} }
} }

View File

@ -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",
}; };