From: timriker Date: Fri, 27 May 2005 16:16:27 +0000 (+0000) Subject: don't allow nuking with regex edits X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3692d4f89014f602e98e763ffe7ffce83591df10;p=infobot.git don't allow nuking with regex edits git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1224 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Factoids/Core.pl b/src/Factoids/Core.pl index 9fe0670..ed8146a 100644 --- a/src/Factoids/Core.pl +++ b/src/Factoids/Core.pl @@ -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