]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/News.pl
explicit $chan for getChanConfDefault
[infobot.git] / src / Modules / News.pl
index a2d7c3eab88b997ed0e5154a0f311a45fcf157ee..c82b5772730d04daad16574ef74dd6338ac74849 100644 (file)
@@ -118,7 +118,7 @@ sub Parse {
     } elsif ($what =~ /^(un)?notify$/i) {
        my $state = ($1) ? 0 : 1;
 
-       # TODO: don't notify even if "news" is called.
+       # TODO: don't notify even if "News" is called.
        if (!&::IsChanConf("newsNotifyAll")) {
            &::DEBUG("news: chan => $chan, ::chan => $::chan.");
            &::notice($who, "not available for this channel or disabled altogether.");
@@ -281,7 +281,7 @@ sub add {
     }
 
     $::news{$chan}{$str}{Time} = time();
-    my $expire = &::getChanConfDefault("newsDefaultExpire",7);
+    my $expire = &::getChanConfDefault("newsDefaultExpire",7, $chan);
     $::news{$chan}{$str}{Expire}       = time() + $expire*60*60*24;
     $::news{$chan}{$str}{Author}       = $::who;       # case!