diff --git a/lib/commands/parser.pm b/lib/commands/parser.pm index 91caf20951fa781747f13eade7c4f7c881501163..6b1ea97ebcf8fc413a5e728472e2019569cfdfad 100644 --- a/lib/commands/parser.pm +++ b/lib/commands/parser.pm @@ -43,7 +43,7 @@ sub exec { my ($kernel, $user, $chan, $msg) = @_; my ($nick, $mask) = split(/!/,$user); - if ($msg =~ /^ *!fav(?: (\S+))?/) { + if ($msg =~ /^ *!fav(?: (\S+))? *$/) { my $index = $1; try { my $id = utils::id::get($chan->[0], $index); @@ -52,7 +52,7 @@ sub exec { $irc->yield(privmsg => $chan->[0] => $insultes[rand @insultes]); } } - elsif ($msg =~ /^ *!later(?: (-?[0-9]+))?(?: in ([0-9]*)?(h|m|s)?)?/) { + elsif ($msg =~ /^ *!later(?: (\S+))?(?: in (\d)+(h|m|s)?)? *$/) { my $index = $1; my ($time, $unit) = ($2, $3); @@ -63,7 +63,7 @@ sub exec { $irc->yield(privmsg => $chan->[0] => $insultes[rand @insultes]); }; } - elsif ($msg =~ /^( *!tag)(?:( +)(-?[0-9]+))?/) { + elsif ($msg =~ /^( *!tag)(?:( +)(-?\d+))?/) { my $index = $3; my $id;