]> iEval git - app-statsbot.git/commitdiff
Send error messages correctly
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 24 Oct 2015 23:44:38 +0000 (00:44 +0100)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 24 Oct 2015 23:44:38 +0000 (00:44 +0100)
lib/App/Statsbot.pm

index d91020322efc2505ccf92ef89da5b6251fe8e842..49fb66fe0dda4aab3bbd5068265caf1c951a7c83 100644 (file)
@@ -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;
        };
 
This page took 0.02544 seconds and 4 git commands to generate.