3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

MessageHistory: recall special characters can now be escaped

This commit is contained in:
Pragmatic Software 2021-08-19 11:05:36 -07:00
parent 68ed2e7580
commit 49d92aa1bd
2 changed files with 4 additions and 4 deletions

View File

@ -1125,8 +1125,8 @@ sub recall_message_by_text {
my ($self, $id, $channel, $text, $ignore_command, $use_aliases) = @_;
my $search = "%$text%";
$search =~ s/\*/%/g;
$search =~ s/\?/_/g;
$search =~ s/(?<!\\)\.?\*/%/g;
$search =~ s/(?<!\\)\?/_/g;
my $messages = eval {
my $sql = 'SELECT * FROM Messages WHERE channel = ? AND msg LIKE ? ESCAPE "\" ';

View File

@ -25,8 +25,8 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4355,
BUILD_DATE => "2021-08-15",
BUILD_REVISION => 4358,
BUILD_DATE => "2021-08-19",
};
sub initialize {}