]> git.donarmstrong.com Git - infobot.git/blobdiff - src/logger.pl
- added top3 irctextcounter stats
[infobot.git] / src / logger.pl
index ad4efa53a4dd9979548eb96272c387a1af20eb8c..2ba41506fcbfc2aba6bd0c0711dda63363d7dc4c 100644 (file)
@@ -191,7 +191,7 @@ sub status {
 
     if ($input eq $logold) {
        # allow perl flooding
-       $logrepeat++ unless (/!WARN! PERL: Use of uninitialized/);
+       $logrepeat++ unless ($input =~ /PERL: Use of uninitialized/);
 
        # todo: prevent massive repetitive throttling.
        if ($logrepeat >= 3) {
@@ -222,10 +222,16 @@ sub status {
 
     for ($input) {
        s/\n+$//;
-       s/\n/<NL>/g;
        s/\002|037//g;  # bold,video,underline => remove.
     }
 
+    # does this work?
+    if ($input =~ /\n/) {
+       foreach (split(/\n/, $input)) {
+           &status($_);
+       }
+    }
+
     # pump up the stats.
     $statcount++;