From: Marius Gavrilescu Date: Sat, 24 Oct 2015 23:44:38 +0000 (+0100) Subject: Send error messages correctly X-Git-Tag: 0.001001~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=490e26f9bf344184da03c64458dbe28e3f49f208;p=app-statsbot.git Send error messages correctly --- diff --git a/lib/App/Statsbot.pm b/lib/App/Statsbot.pm index d910203..49fb66f 100644 --- a/lib/App/Statsbot.pm +++ b/lib/App/Statsbot.pm @@ -112,9 +112,9 @@ sub on_public{ my $botnick = $irc->nick_name; if ($message =~ /(?:$botnick[:,])?\s*!?help\s*(.*)/) { - $irc->yield("Try !presence username interval [truncate]"); - $irc->yield("For example, !presence mgv '2 days'"); - $irc->yield("or !presence mgv '1 year' 4"); + $irc->yield(privmsg => $targets, "Try !presence username interval [truncate]"); + $irc->yield(privmsg => $targets, "For example, !presence mgv '2 days'"); + $irc->yield(privmsg => $targets, "or !presence mgv '1 year' 4"); return; } @@ -131,7 +131,7 @@ sub on_public{ eval { $time = parse_duration $time; } or do { - $irc->yield("cannot parse timespec: $time"); + $irc->yield(privmsg => $targets, "cannot parse timespec: $time"); return; };