Inheritance: AdminCommandInfo
Ejemplo n.º 1
0
 public void AddKick(KickInfo ki, Action <bool> callback)
 {
     callback(false);
 }
Ejemplo n.º 2
0
 public void AddKick(KickInfo ki, Action<bool> callback)
 {
     callback(false);
 }
Ejemplo n.º 3
0
        public override void Execute(Player player)
        {
            if (player != null && !player.Privileges.HasPrivilege("kick")) {
                WriteLine(player, "You have no kick privileges");
                return;
            }

            Player target = Player.Find(Target);

            if (target == null) {
                WriteLine(player, "Couldn't find target player");
                return;
            }

            if (target.Privileges.HasPrivilege("immunity")) {
                WriteLine(player, "Target has general immunity");
                return;
            }

            if (target.Privileges.HasPrivilege("nokick")) {
                WriteLine(player, "Target has kick immunity");
                return;
            }

            KickInfo ki = new KickInfo(player, target, Reason);

            target.Kick(Reason);

            SharpMod.Database.AddKick(ki, (kicked) => { });
        }