X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FModules%2FNews.pl;h=128bb2c821c85d9034bdd5b52582dbcc53cbd687;hb=346e5bd13875b55c25c90c58cf186f747100689d;hp=fcf62b9ca28bba6a357fedff093902811cbb291d;hpb=22a73ba6205f6120785f2e6a17921a76774ec3f7;p=infobot.git diff --git a/src/Modules/News.pl b/src/Modules/News.pl index fcf62b9..128bb2c 100644 --- a/src/Modules/News.pl +++ b/src/Modules/News.pl @@ -751,9 +751,9 @@ sub latest { } if (!defined $t) { +# &::msg($who, "News is disabled for $chan"); &::DEBUG("news: something went really wrong."); - &::DEBUG("news: chan => $chan, ::chan => $::chan"); -# &::notice($who, "something went really wrong."); + &::DEBUG("news: chan => $chan."); return; } @@ -786,7 +786,7 @@ sub latest { # scalar @new, !$flag my $unread = scalar @new; my $total = scalar keys %{ $::news{$chan} }; - if (!$flag) { + if (!$flag || &::IsChanConf("newsTellUnread")) { return unless ($unread); # just a temporary measure not to flood ourself off the @@ -898,6 +898,8 @@ sub getNewsItem { my($what) = @_; my $item = 0; + $what =~ s/^\#//; # '#1' for example. + my %time; foreach (keys %{ $::news{$chan} }) { my $t = $::news{$chan}{$_}{Time};