mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 03:02:47 +01:00
Plugin/Quotegrabs: rq
now properly searches multi-grabs
This commit is contained in:
parent
640f866829
commit
d8b19eff68
@ -114,9 +114,14 @@ sub get_random_quotegrab {
|
||||
my $where = 'WHERE ';
|
||||
my $and = '';
|
||||
|
||||
# multi-grabs have the nick separated by +'s so we must test for
|
||||
# nick, nick+*, *+nick, and *+nick+* to match each of these cases
|
||||
if (defined $nick) {
|
||||
$sql .= $where . 'nick LIKE ? ';
|
||||
$sql .= $where . 'nick LIKE ? OR nick LIKE ? OR nick LIKE ? OR nick LIKE ?';
|
||||
push @params, "$nick";
|
||||
push @params, "$nick+%";
|
||||
push @params, "%+$nick";
|
||||
push @params, "%+$nick+%";
|
||||
$where = '';
|
||||
$and = 'AND ';
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4640,
|
||||
BUILD_DATE => "2023-03-23",
|
||||
BUILD_REVISION => 4641,
|
||||
BUILD_DATE => "2023-03-30",
|
||||
};
|
||||
|
||||
sub initialize {}
|
||||
|
Loading…
Reference in New Issue
Block a user