]> git.donarmstrong.com Git - infobot.git/commitdiff
don't allow nuking with regex edits
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 27 May 2005 16:16:27 +0000 (16:16 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 27 May 2005 16:16:27 +0000 (16:16 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1224 c11ca15a-4712-0410-83d8-924469b57eb5

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