3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-04 18:38:47 +02:00

Don't allow spaces in factoid keywords

This commit is contained in:
Pragmatic Software 2014-04-19 10:37:03 +00:00
parent 030fed38f2
commit b642460d84
2 changed files with 3 additions and 3 deletions

View File

@ -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>";

View File

@ -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",
};