]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/News.pl
ws
[infobot.git] / src / Modules / News.pl
index 948767f24831c17fa9f27b04740e4ba0172f3225..caee5f104751e0fab85324b543997dfecb8f4292 100644 (file)
@@ -542,7 +542,7 @@ sub mod {
        if ($flags eq "") {
            $done++ if (!$done and $mod_news  =~ s/\Q$op\E/$np/);
            $done++ if (!$done and $mod_nnews =~ s/\Q$op\E/$np/);
-        } elsif ($flags eq "g") {
+       } elsif ($flags eq "g") {
            $done++ if ($mod_news  =~ s/\Q$op\E/$np/g);
            $done++ if ($mod_nnews =~ s/\Q$op\E/$np/g);
        }
@@ -721,11 +721,11 @@ sub set {
 }
 
 sub latest {
-    my($tchan, $flag) = @_;
+    my ($tchan, $flag) = @_;
 
-    # hack hack hack.
-    $chan ||= $tchan;
-    $who    = $::who;
+    # hack hack hack.  fix later.
+    $chan = $tchan;
+    $who  = $::who;
 
     # todo: if chan = undefined, guess.
 #    if (!exists $::news{$chan}) {
@@ -799,7 +799,7 @@ sub latest {
     if (!$flag) {
        return unless ($unread);
 
-       # just a temporary measure not to flood ourself off the 
+       # just a temporary measure not to flood ourself off the
        # network with news until we get global notice() and msg()
        # throttling.
        if (time() - ($::cache{newsTime} || 0) < 5) {
@@ -831,7 +831,7 @@ sub latest {
            $i   = &newsS2N($_);
            $sorted[$i] = $_;
        }
-       
+
        for ($i=0; $i<=scalar(@sorted); $i++) {
            my $news = $sorted[$i];
            next unless (defined $news);