Beispiel #1
0
        public override void Initialize()
        {
            base.Initialize();

            List <Add.Base>    adds    = new List <Add.Base> ();
            List <Remove.Base> removes = new List <Remove.Base> ();
            List <List.Base>   lists   = new List <List.Base> ();

            for (int i = 0; i < (int)AutoCommands.Event.Count; i++)
            {
                AutoCommands.Event eve  = ((AutoCommands.Event)i);
                string             name = eve.ToString().ToLower();
                adds.Add(new Add.Base(name, eve));
                removes.Add(new Remove.Base(name, eve));
                lists.Add(new List.Base(name, eve));
            }
            Add    addSet    = new Add();
            Remove removeSet = new Remove();
            List   listSet   = new List();

            AddProceduralCommands(addSet);
            AddProceduralCommands(removeSet);
            AddProceduralCommands(listSet);

            addSet.AddProceduralCommands(adds.ToArray());
            removeSet.AddProceduralCommands(removes.ToArray());
            listSet.AddProceduralCommands(lists.ToArray());
            // This could all be done in a loop I guess.
        }
Beispiel #2
0
 public Task <Result> Execute(SocketUserMessage e, string name)
 {
     if (AutoCommands.RemoveChain(eve, name))
     {
         return(TaskResult(true, "Succesfully removed chain **" + name + " from " + eve.ToString() + "."));
     }
     else
     {
         return(TaskResult(false, "Failed to remove chain from event - Chain **" + name + "** not found in **" + eve.ToString() + "**."));
     }
 }