]> git.donarmstrong.com Git - infobot.git/commitdiff
non-mysql stub
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 23 Sep 2000 12:45:22 +0000 (12:45 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 23 Sep 2000 12:45:22 +0000 (12:45 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@131 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/RootWarn.pl

index ddb533a47a7e870ba65e39d26beb29810ab11ede..fdd7fc1c285364eca2a5cb13afacf06e05342a06 100644 (file)
@@ -1,7 +1,7 @@
 #
 # RootWarn.pl: Warn people about usage of root on IRC.
 #      Author: dms
-#     Version: v0.2c (19991125)
+#     Version: v0.3 (20000923)
 #     Created: 19991008
 #
 
@@ -61,13 +61,19 @@ sub CmdrootWarn {
     my $count = &countKeys("rootwarn");
 
     if ($count == 0) {
-       return "no-one has been warned about root, woohoo";
+       &performReply("no-one has been warned about root, woohoo");
+       return;
     }
 
     # reply #1.
     $reply = "there ".&fixPlural("has",$count) ." been \002$i\002 ".
                &fixPlural("rooter",$count) ." warned about root.";
 
+    if ($param{'DBType'} !~ /^mysql$/i) {
+       &FIXME("rootwarn does not yet support non-mysql.");
+       return;
+    }
+
     # reply #2.
     $found = 0;
     my $query = "SELECT attempt FROM rootwarn WHERE attempt > 2";
@@ -87,7 +93,7 @@ sub CmdrootWarn {
                " done it at least 3 times.";
     }
 
-    return $reply;
+    &performStrictReply($reply);
 }
 
 1;