]> git.donarmstrong.com Git - infobot.git/commitdiff
strip trailing whitespaces, force use of quotes to enable trailing
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 23 Feb 2001 12:26:15 +0000 (12:26 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 23 Feb 2001 12:26:15 +0000 (12:26 +0000)
whitespace. requested by asuffield and \broken?.

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

src/CommandStubs.pl

index 26e3b3eda87bb1991c6a10b251ab19de5b439807..d4e22442be8c8edce78113b7c910865115010d37 100644 (file)
@@ -257,6 +257,12 @@ sub Modules {
 
        my $thiscmd     = lc($1);
        my $args        = $3;
+       $args           =~ s/\s+$//g;
+       # suggested by asuffield nad \broken.
+       if ($args =~ /^["']/ and $args =~ /["']$/) {
+           &DEBUG("list*: removed quotes.");
+           $args       =~ s/^["']|["']$//g;
+       }
 
        $thiscmd =~ s/^vals$/values/;
        return if ($thiscmd ne "keys" && $thiscmd ne "values");