mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01: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;
|
||||
|
||||
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);
|
||||
@ -664,10 +664,13 @@ sub factfind {
|
||||
}
|
||||
|
||||
if($arguments ne "") {
|
||||
my $unquoted_args = $arguments;
|
||||
$unquoted_args =~ s/(?:\\(?!\\))//g;
|
||||
$unquoted_args =~ s/(?:\\\\)/\\/g;
|
||||
if(not defined $argtype) {
|
||||
$argtype = "with text containing '$arguments'";
|
||||
$argtype = "with text containing '$unquoted_args'";
|
||||
} 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
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 499,
|
||||
BUILD_REVISION => 500,
|
||||
BUILD_DATE => "2014-03-04",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user