]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/News.pl
- modules: woops, used wrong var. should work now.
[infobot.git] / src / Modules / News.pl
index fcf62b9ca28bba6a357fedff093902811cbb291d..128bb2c821c85d9034bdd5b52582dbcc53cbd687 100644 (file)
@@ -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};