mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +01:00
Make "is" optional in factadd
This commit is contained in:
parent
4d6348c5b0
commit
2e0a5e411c
@ -510,7 +510,7 @@ sub add_regex {
|
|||||||
sub factadd {
|
sub factadd {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($from, $nick, $user, $host, $arguments) = @_;
|
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) {
|
if(not defined $from_chan or not defined $text or not defined $keyword) {
|
||||||
return "Usage: factadd <channel> <keyword> is <factoid>";
|
return "Usage: factadd <channel> <keyword> is <factoid>";
|
||||||
|
Loading…
Reference in New Issue
Block a user