From a3b20faf2114bceaba643022dce9f698f870892c Mon Sep 17 00:00:00 2001
From: timriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Fri, 27 May 2005 16:16:27 +0000
Subject: [PATCH] don't allow nuking with regex edits

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1224 c11ca15a-4712-0410-83d8-924469b57eb5
---
 blootbot/src/Factoids/Core.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/blootbot/src/Factoids/Core.pl b/blootbot/src/Factoids/Core.pl
index 9fe0670..ed8146a 100644
--- a/blootbot/src/Factoids/Core.pl
+++ b/blootbot/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
-- 
2.39.5