mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +01:00
Don't allow spaces in factoid keywords
This commit is contained in:
parent
030fed38f2
commit
b642460d84
@ -204,7 +204,7 @@ sub list {
|
||||
if($arguments =~/^messages\s+(.*)$/) {
|
||||
my ($mask_search, $channel_search, $text_search) = split / /, $1;
|
||||
|
||||
return "/msg $nick Usage: !list messages <hostmask or nick regex> <channel regex> [text regex]" if not defined $channel_search;
|
||||
return "/msg $nick Usage: list messages <hostmask or nick regex> <channel regex> [text regex]" if not defined $channel_search;
|
||||
$text_search = '.*' if not defined $text_search;
|
||||
|
||||
my @results = eval {
|
||||
@ -375,7 +375,7 @@ sub add_regex {
|
||||
sub factadd {
|
||||
my $self = shift;
|
||||
my ($from, $nick, $user, $host, $arguments) = @_;
|
||||
my ($from_chan, $keyword, $text) = $arguments =~ /^(.*?)\s+(.*?)\s+is\s+(.*)$/i if defined $arguments;
|
||||
my ($from_chan, $keyword, $text) = $arguments =~ /^(\S+)\s+(\S+)\s+is\s+(.*)$/i if defined $arguments;
|
||||
|
||||
if(not defined $from_chan or not defined $text or not defined $keyword) {
|
||||
return "/msg $nick Usage: factadd <channel> <keyword> is <factoid>";
|
||||
|
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 546,
|
||||
BUILD_REVISION => 547,
|
||||
BUILD_DATE => "2014-04-19",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user