]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/scramble.pl
take a few more things literally
[infobot.git] / src / Modules / scramble.pl
index 970040604ef658b43004366c6cddd830e21c615e..63161482979c6aae3c31f3b9ac24974ca47cde31 100644 (file)
@@ -41,13 +41,12 @@ sub scramble
       {
        # non-random shuffle, but good enough
        ($new_middle = $middle) =~ s/(.)(.)/$2$1/g;
-       last;
       }
 
       # shuffle the middle letters
-      $new_middle = join "", List::Util::shuffle(split //, $middle);
+      $new_middle = join '', List::Util::shuffle(split //, $middle);
     }
-    while ($middle eq $new_middle);
+    while (($cnt < 10) && ($middle eq $new_middle));
 
     # add the word to the list...
     $scrambled .= "$first$new_middle$last ";
@@ -57,7 +56,7 @@ sub scramble
   # been included in the original string
   $scrambled =~ s/\s+$//;
 
-  &::pSReply($scrambled||"Unknown Error Condition");
+  &::performStrictReply($scrambled||'Unknown Error Condition');
 }
 
 1;