]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/IrcHooks.pl
- irctextcounters: add percentage to top3
[infobot.git] / src / IRC / IrcHooks.pl
index 304246b81fb0926ecf0d1f12db0e5fb8c1da5249..b1817147c5c9ed7ecfe80eb13b29d75449747a8c 100644 (file)
@@ -360,8 +360,10 @@ sub on_disconnect {
 
     &clearIRCVars();
     if (!$self->connect()) {
-       &WARN("not connected? help me. gonna call ircCheck() in 1800s");
-       &ScheduleThis(30, "ircCheck");
+       &WARN("not connected? help me. gonna call ircCheck() in 60s");
+       &ScheduleThis(1, "ircCheck");
+#      &ScheduleThis(10, "ircCheck");
+#      &ScheduleThis(30, "ircCheck");
     }
 }
 
@@ -818,9 +820,10 @@ sub on_public {
     if ($_ = &getChanConf("ircTextCounters")) {
        foreach (split /[\s]+/) {
            next unless ($msg =~ /^\Q$_\E$/i);
-           &status("textcounters: $_ matched for $who");
+           &VERB("textcounters: $_ matched for $who",2);
 
-           my $v = &dbGet("stats", "counter", "nick='$who' and type='$msg'");
+           my $v = &dbGet("stats", "counter", "nick=".&dbQuote($who).
+                       " AND type='$msg'");
            $v++;
 
            &dbReplace("stats", (nick => $who, type => $_, counter => $v) );