From 490e26f9bf344184da03c64458dbe28e3f49f208 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 25 Oct 2015 00:44:38 +0100 Subject: [PATCH] Send error messages correctly --- lib/App/Statsbot.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; }; -- 2.39.2