From 980b1879c8029f9357488fc64166812f0259f796 Mon Sep 17 00:00:00 2001 From: timriker Date: Thu, 9 Oct 2003 17:52:49 +0000 Subject: [PATCH] trailing whitespace git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@839 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/CommandStubs.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CommandStubs.pl b/src/CommandStubs.pl index 4f0e121..1deef14 100644 --- a/src/CommandStubs.pl +++ b/src/CommandStubs.pl @@ -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) { -- 2.39.2