Exemple #1
0
        protected void TriggerSubCommand(CmdTrigger <C> trigger)
        {
            var subAlias = trigger.Text.NextWord();

            SubCommand subCmd;

            if (m_subCommands.TryGetValue(subAlias, out subCmd))
            {
                if (RootCmd.MayTrigger(trigger, subCmd, false))
                {
                    subCmd.Process(trigger);
                }
            }
            else
            {
                trigger.Reply("SubCommand not found: " + subAlias);
                trigger.Text.Skip(trigger.Text.Length);
                mgr.DisplayCmd(trigger, this, false, false);
            }
        }
Exemple #2
0
        protected void TriggerSubCommand(CmdTrigger <C> trigger)
        {
            string     key = trigger.Text.NextWord();
            SubCommand subCommand;

            if (m_subCommands.TryGetValue(key, out subCommand))
            {
                if (!RootCmd.MayTrigger(trigger, subCommand, false))
                {
                    return;
                }
                subCommand.Process(trigger);
            }
            else
            {
                trigger.Reply("SubCommand not found: " + key);
                trigger.Text.Skip(trigger.Text.Length);
                mgr.DisplayCmd(trigger, this, false, false);
            }
        }