mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
MessageHistory: recall
special characters can now be escaped
This commit is contained in:
parent
68ed2e7580
commit
49d92aa1bd
@ -1125,8 +1125,8 @@ sub recall_message_by_text {
|
|||||||
my ($self, $id, $channel, $text, $ignore_command, $use_aliases) = @_;
|
my ($self, $id, $channel, $text, $ignore_command, $use_aliases) = @_;
|
||||||
|
|
||||||
my $search = "%$text%";
|
my $search = "%$text%";
|
||||||
$search =~ s/\*/%/g;
|
$search =~ s/(?<!\\)\.?\*/%/g;
|
||||||
$search =~ s/\?/_/g;
|
$search =~ s/(?<!\\)\?/_/g;
|
||||||
|
|
||||||
my $messages = eval {
|
my $messages = eval {
|
||||||
my $sql = 'SELECT * FROM Messages WHERE channel = ? AND msg LIKE ? ESCAPE "\" ';
|
my $sql = 'SELECT * FROM Messages WHERE channel = ? AND msg LIKE ? ESCAPE "\" ';
|
||||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4355,
|
BUILD_REVISION => 4358,
|
||||||
BUILD_DATE => "2021-08-15",
|
BUILD_DATE => "2021-08-19",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
Reference in New Issue
Block a user