actually use count (for best_count), dont +=1 spec arg for non-consume
This commit is contained in:
parent
73aeb6bde4
commit
82d20869e1
1 changed files with 5 additions and 2 deletions
|
@ -143,7 +143,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
current_error = None
|
current_error = None
|
||||||
count = 0
|
count = 0
|
||||||
for i, spec_argument in enumerate(spec_arguments):
|
spec_index = 0
|
||||||
|
for spec_argument in spec_arguments:
|
||||||
argument_type_multi = len(set(
|
argument_type_multi = len(set(
|
||||||
t.type for t in spec_argument.types)) > 1
|
t.type for t in spec_argument.types)) > 1
|
||||||
options = self._spec_value(server, kwargs["channel"], user,
|
options = self._spec_value(server, kwargs["channel"], user,
|
||||||
|
@ -166,8 +167,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
else:
|
else:
|
||||||
value = None
|
value = None
|
||||||
|
|
||||||
|
count += 1
|
||||||
if spec_argument.consume:
|
if spec_argument.consume:
|
||||||
out[i] = value
|
out[spec_index] = value
|
||||||
|
spec_index += 1
|
||||||
if argument_type:
|
if argument_type:
|
||||||
key = argument_type.name() or argument_type.type
|
key = argument_type.name() or argument_type.type
|
||||||
out[key] = value
|
out[key] = value
|
||||||
|
|
Loading…
Reference in a new issue