From: dms Date: Fri, 9 Feb 2001 13:40:01 +0000 (+0000) Subject: changed FlatArg to ArrayArgs to make more sense. by default, we use flat-args X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8f47e717f7cb8c85ce1cab1b52b3bff7122eebbd;p=infobot.git changed FlatArg to ArrayArgs to make more sense. by default, we use flat-args git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@371 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/CommandStubs.pl b/src/CommandStubs.pl index c942c9d..7166b6f 100644 --- a/src/CommandStubs.pl +++ b/src/CommandStubs.pl @@ -95,7 +95,7 @@ sub parseCmdHook { if (exists $hash{'Forker'}) { $hash{'Identifier'} .= "-" if ($hash{'Forker'} eq "NULL"); - if (exists $hash{'FlatArg'} and $hash{'FlatArg'} == 0) { + if (exists $hash{'ArrayArgs'}) { &Forker($hash{'Identifier'}, sub { \&{$hash{'CODEREF'}}(@args) } ); } else { &Forker($hash{'Identifier'}, sub { \&{$hash{'CODEREF'}}($flatarg) } ); @@ -108,8 +108,7 @@ sub parseCmdHook { ### TODO: check if CODEREF exists. - if (exists $hash{'FlatArg'} and $hash{'FlatArg'} == 0) { - &status("CmdHook: using args as array."); + if (exists $hash{'ArrayArgs'}) { &{$hash{'CODEREF'}}(@args); } else { &{$hash{'CODEREF'}}($flatarg);