Esempio n. 1
0
 public CommandAttribute(string commandName, bool isAdmin, TickDelay tickLength, int minLevel,
                         params object[] args)
 {
     CommandName  = commandName;
     IsAdmin      = isAdmin;
     TickLength   = tickLength;
     Parameters   = args;
     MinimumLevel = minLevel;
 }
Esempio n. 2
0
        private void setTimeout(SpammedCommand command, TickDelay tickLength)
        {
            //Server.Current.Log(string.Format("command timeout: {0}", command.Context.CommandName));
            var t = new System.Timers.Timer()
            {
                Interval  = (long)tickLength,
                AutoReset = false,
            };

            t.Elapsed += (sender, e) => nextCommand(sender, e, command);
            t.Start();
        }
Esempio n. 3
0
        private void setTimeout(TickDelay tickDelay)
        {
            //Server.Current.Log("generic timeout");
            var t = new System.Timers.Timer()
            {
                Interval  = (long)tickDelay,
                AutoReset = false,
            };

            t.Elapsed += makeReady;
            t.Start(); // fire this in tickDelay ms
        }
Esempio n. 4
0
 public PlayerCommand(TickDelay tickLength)
 {
     TickLength = TickLength;
 }
Esempio n. 5
0
 public CommandAttribute(string commandName, bool isAdmin, TickDelay tickLength, params object[] args)
     : this(commandName, isAdmin, tickLength, 1, args)
 {
 }