void PardonPlayer(object sender, EventArgs e)
 {
     foreach (PlayerListItem i in SelectedItems)
     {
         ProxyControl.Pardon(i.Item.Username);
     }
 }
Exemple #2
0
        void HandleTpPlayerClick(object sender, EventArgs e)
        {
            var c = Map.Position.Clone();

            c.Y = 100;
            ProxyControl.Tp("Player", c, Map.Dimension);
        }
Exemple #3
0
        void HandlePardonClick(object sender, EventArgs e)
        {
            string u = TextInput.GetInput(this, "Who");

            if (u == null)
            {
                return;
            }
            ProxyControl.Pardon(u);
        }
Exemple #4
0
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
            ProxyControl.Update += PlayersUpdated;

#if DEBUG
            ProxyControl.Connect(25465);
            ServerCommander.Startup();
#else
            ProxyControl.Connect(25465);
            ServerCommander.Startup();
#endif
        }
Exemple #5
0
        void HandleBanClick(object sender, EventArgs e)
        {
            string u = TextInput.GetInput(this, "Who");

            if (u == null)
            {
                return;
            }
            string w = TextInput.GetInput(this, "Why");

            if (w == null)
            {
                return;
            }
            ProxyControl.Ban(u, DateTime.MaxValue, w);
        }
        void KickPlayer(object sender, EventArgs e)
        {
            string players = "";

            foreach (PlayerListItem i in SelectedItems)
            {
                players += " " + i.Item.Username;
            }

            string reason = TextInput.GetInput(this, "Why Kick" + players);

            if (reason == null)
            {
                return;
            }

            foreach (PlayerListItem i in SelectedItems)
            {
                ProxyControl.Kick(i.Item, reason);
            }
        }
        void BanPlayer30(object sender, EventArgs e)
        {
            string players = "";

            foreach (PlayerListItem i in SelectedItems)
            {
                players += " " + i.Item.Username;
            }

            string reason = TextInput.GetInput(this, "Why Ban" + players);

            if (reason == null)
            {
                return;
            }

            foreach (PlayerListItem i in SelectedItems)
            {
                ProxyControl.Ban(i.Item, DateTime.Now.AddMinutes(30), reason);
            }
        }
Exemple #8
0
 protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 {
     ProxyControl.Stop();
     base.OnClosing(e);
 }