]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/spell.pl
take a few more things literally
[infobot.git] / src / Modules / spell.pl
index dda751f1305fa5e9a2d02d1173ac8f508f33633c..705854dfdde8913266c9c61d6cd7e46697c665ec 100644 (file)
@@ -14,6 +14,10 @@ use strict;
 
 sub spell::spell {
        my $query = shift;
+       if ($query =~ m/[^[:alpha:]]/) {
+               return('only one word of alphabetic characters supported');
+       }
+
        my $binary;
        my @binaries = (
                '/usr/bin/aspell',
@@ -29,11 +33,11 @@ sub spell::spell {
        }
 
        if (!$binary) {
-               return("no binary found.");
+               return('no binary found.');
        }
 
        if (!&::validExec($query)) {
-               return("argument appears to be fuzzy.");
+               return('argument appears to be fuzzy.');
        }
 
        my $reply = "I can't find alternate spellings for '$query'";