]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Core.pl
don't allow nuking with regex edits
[infobot.git] / src / Factoids / Core.pl
index 9fe0670fbabb3ec817ea2f84f98ddd1805cd95dd..ed8146a5a9f84aa5a1a2ae9a83478ee9d7424fe1 100644 (file)
@@ -427,6 +427,11 @@ sub FactoidStuff {
                    &performReply("that's too long");
                    return;
                }
+               # empty
+               if (length $result == 0) {
+                   &performReply("factoid would be empty. use forget?");
+                   return;
+               }
                # min length.
                my $faqauth = &getFactInfo($faqtoid, "created_by");
                if ((length $result)*2 < length $was and