1
0

Fixed InfoReg.lua's handling of multi-level commands.

This commit is contained in:
madmaxoft 2014-03-16 21:30:44 +01:00
parent 5ac863f7fa
commit 4227066f6d

View File

@ -59,13 +59,13 @@ local function MultiCommandHandler(a_Split, a_Player, a_CmdString, a_CmdInfo, a_
return true;
end
-- Check if the handler is valid:
-- If the handler is not valid, check the next sublevel:
if (Subcommand.Handler == nil) then
if (Subcommand.Subcommands == nil) then
LOG("Cannot find handler for command " .. a_CmdString .. " " .. Verb);
return false;
end
ListSubcommands(a_Player, Subcommand.Subcommands, a_CmdString .. " " .. Verb);
MultiCommandHandler(a_Split, a_Player, a_CmdString .. " " .. Verb, Subcommand, a_Level + 1);
return true;
end