]> git.donarmstrong.com Git - infobot.git/commitdiff
- allow SARing of factoids on _long_ factoids providing the new string
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 3 Jan 2001 13:42:07 +0000 (13:42 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 3 Jan 2001 13:42:07 +0000 (13:42 +0000)
  is shorter than the subst string.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@222 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Update.pl

index 0d678695d0772fa363d301f2ff31f976ca7b3abb..334a72b5928af738f26734d5d606029793453d46 100644 (file)
@@ -105,8 +105,12 @@ sub update {
 
            # max length check again.
            if (length($rhs) > $param{'maxDataSize'}) {
-               &performAddressedReply("that's too long");
-               return $noreply;
+               if (length($rhs) > length($exists)) {
+                   &performAddressedReply("that's too long");
+                   return $noreply;
+               } else {
+                   &status("Update: new length is still longer than maxDataSize but less than before, we'll let it go.");
+               }
            }
 
            &performAddressedReply("okay");