]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/IrcHooks.pl
Second round of News changes and bug fixes, kudos to greycat
[infobot.git] / src / IRC / IrcHooks.pl
index 87d3f6857967ff88098b3d4a7172ed48e98c167f..0fce62ed03aa2c61cb1d2f38daa1e9e535b6954c 100644 (file)
@@ -491,7 +491,7 @@ sub on_join {
        if (scalar @new) {
            &msg($who, "+==== New news for $chan (".scalar(@new)."):");
            # todo: show how many sec/min/etc ago?
-           my $timestr = &Time2String( $::newsuser{$chan}{$who} );
+           my $timestr = &Time2String( time() - $::newsuser{$chan}{$who} );
            &msg($who, "|= Last time read $timestr ago");
 
            foreach (@new) {
@@ -500,6 +500,7 @@ sub on_join {
                &msg($who, sprintf("\002[\002%2d\002]\002 %s (%s)",
                        $i, $_, &Time2String($age) ) );
            }
+           &msg($who, "to read, do 'news read <#>' or 'news read <keyword>'");
 
            # lame hack to prevent dupes if we just ignore it.
            $::newsuser{$chan}{$who} = time();