my ($targets,$message)=@_[ARG1,ARG2];
my $botnick = _nick_name;
- if ($message =~ /(?:$botnick[:,])?\s*!?help\s*(.*)/sx) {
+ if ($message =~ /^(?:$botnick[:,]\s*!?|\s*!)help/sx) {
_yield(privmsg => $targets, 'Try !presence username interval [truncate]');
_yield(privmsg => $targets, q/For example, !presence mgv '2 days'/);
_yield(privmsg => $targets, q/or !presence mgv '1 year' 4/);
return;
}
- return unless $message =~ /(?:$botnick[:,])?\s*!?presence\s*(.*)/sx;
+ return unless $message =~ /^(?:$botnick[:,])?\s*!?presence\s*(.*)/sx;
my ($nick, $time, $truncate) = shellwords $1;
$truncate//=-1;
# < mgv> !presence mgv
# < mgv> presence mgv '1 day'
# < mgv> BOTNICK: !presence mgv '1 year' 2
- # < mgv> BOTNICK: presence mgv
+ # < mgv> BOTNICK, presence mgv
+ # < mgv> !help
+ # < mgv> BOTNICK: help
+ # < mgv> BOTNICK, help
=head1 DESCRIPTION