3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-30 07:59:42 +01:00

Make "is" optional in factadd

This commit is contained in:
Pragmatic Software 2016-01-16 16:55:18 -08:00
parent 4d6348c5b0
commit 2e0a5e411c

View File

@ -510,7 +510,7 @@ sub add_regex {
sub factadd {
my $self = shift;
my ($from, $nick, $user, $host, $arguments) = @_;
my ($from_chan, $keyword, $text) = $arguments =~ /^(\S+)\s+(\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 "Usage: factadd <channel> <keyword> is <factoid>";