]> git.donarmstrong.com Git - infobot.git/commitdiff
trailing whitespace
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 9 Oct 2003 17:52:49 +0000 (17:52 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 9 Oct 2003 17:52:49 +0000 (17:52 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@839 c11ca15a-4712-0410-83d8-924469b57eb5

src/CommandStubs.pl

index 4f0e121d49c50bd37673bcf5ff67ba89d283974e..1deef1401b194191ce84aa629f013c1e167a0657 100644 (file)
@@ -44,7 +44,8 @@ sub addCmdHook {
 # RUN IF ADDRESSED.
 sub parseCmdHook {
     my ($hashname, $line) = @_;
-    $line =~ /^(\S+)( (.*))?$/;
+    $line =~ s/^\s+|\s+$//g;   # again.
+    $line =~ /^(\S+)(\s+(.*))?$/;
     my $cmd    = $1;   # command name is whitespaceless.
     my $flatarg        = $3;
     my @args   = split(/\s+/, $flatarg || '');
@@ -73,7 +74,7 @@ sub parseCmdHook {
            next;
        }
 
-       &status("hooks($hashname): $cmd matched '$ident'");
+       &status("hooks($hashname): $cmd matched '$ident' '$flatarg'");
        my %hash = %{ ${"hooks_$hashname"}{$ident} };
 
        if (!scalar keys %hash) {