mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-26 20:52:37 +01:00
Improve wildcard handling
This commit is contained in:
parent
4696df7ea1
commit
b9433127d1
@ -472,10 +472,8 @@ sub recall_message_by_count {
|
||||
sub recall_message_by_text {
|
||||
my ($self, $id, $channel, $text, $ignore_command) = @_;
|
||||
|
||||
$text =~ s/\.\*\?/%/g;
|
||||
$text =~ s/\.\*/%/g;
|
||||
$text =~ s/\*/%/g;
|
||||
$text =~ s/\?/_/g;
|
||||
$text =~ s/\.?\*\??/%/g;
|
||||
$text =~ s/\./_/g;
|
||||
|
||||
my $messages;
|
||||
|
||||
|
@ -101,9 +101,13 @@ sub get_quotegrab {
|
||||
sub get_random_quotegrab {
|
||||
my ($self, $nick, $channel, $text) = @_;
|
||||
|
||||
$nick =~ s/\.?\*/%/g if defined $nick;
|
||||
$channel =~ s/\.?\*/%/g if defined $channel;
|
||||
$text =~ s/\.?\*/%/g if defined $text;
|
||||
$nick =~ s/\.?\*\??/%/g if defined $nick;
|
||||
$channel =~ s/\.?\*\??/%/g if defined $channel;
|
||||
$text =~ s/\.?\*\??/%/g if defined $text;
|
||||
|
||||
$nick =~ s/\./_/g if defined $nick;
|
||||
$channel =~ s/\./_/g if defined $channel;
|
||||
$text =~ s/\./_/g if defined $text;
|
||||
|
||||
my $quotegrab = eval {
|
||||
my $sql = 'SELECT * FROM Quotegrabs ';
|
||||
|
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 606,
|
||||
BUILD_REVISION => 607,
|
||||
BUILD_DATE => "2014-05-30",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user