From: dms Date: Fri, 23 Feb 2001 12:26:15 +0000 (+0000) Subject: strip trailing whitespaces, force use of quotes to enable trailing X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a3292943748d0140eedb574bf9113d0a808618de;p=infobot.git strip trailing whitespaces, force use of quotes to enable trailing whitespace. requested by asuffield and \broken?. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@416 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/CommandStubs.pl b/blootbot/src/CommandStubs.pl index 26e3b3e..d4e2244 100644 --- a/blootbot/src/CommandStubs.pl +++ b/blootbot/src/CommandStubs.pl @@ -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");