/quit (Quit the server showing a reason)

/quit (Quit the server showing a reason)

Postby ane200055 » 25 Jul 2013, 13:04

/quit Reason makes you leave the game showing the reason why.
This also works by doing /part Reason
Code: Select all
//Made by ane200055
//Version v.0.1
using System;
namespace MCDzienny
{
    public class CmdQuit : Command
    {
        public override string name { get { return "quit"; } }
        public override string shortcut { get { return "part"; } }
        public override string type { get { return "information"; } }
        public override bool museumUsable { get { return false; } }
        public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }

        public override void Use(Player p, string message)
        {
            if (message == "")
            {
                Help(p);
                return;
            }

            {
                       p.Kick("You have left the server.");
                  Command.all.Find("say").Use(p, "&c- " + p.color + p.prefix + p.color + p.name + Server.DefaultColor + " disconnected (" + message + Server.DefaultColor + ").");
            }
        }

        public override void Help(Player p)
        {
            Player.SendMessage(p, "%e/quit %bReason %emakes you leave the game showing the reason why.");
         Player.SendMessage(p, "%eThis also works by doing /part %bReason%e.");
        }
    }
}
Website: http://ane200055.co.vu
The Developer of The XtraIRC IRC Client: http://xtrairc.tk
C# coder.
User avatar
ane200055
 
Posts: 98
Joined: 30 Jun 2013, 09:07
Location: United Kingdom

Re: /quit (Quit the server showing a reason)

Postby Breakdown901 » 25 Jul 2013, 13:08

Nice, but this will increase your kicks, which would not look good if applying for staff on a server. Is ther maybe some sort of disconnect event? Like p.Disconnect or something? Anyways, nice :)
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Re: /quit (Quit the server showing a reason)

Postby ane200055 » 25 Jul 2013, 13:16

Breakdown901 wrote:Nice, but this will increase your kicks, which would not look good if applying for staff on a server. Is ther maybe some sort of disconnect event? Like p.Disconnect or something? Anyways, nice :)

Oh well,
If I do vvv
Code: Select all
p.kick("You have left the server.");

I tells you that you left.
Website: http://ane200055.co.vu
The Developer of The XtraIRC IRC Client: http://xtrairc.tk
C# coder.
User avatar
ane200055
 
Posts: 98
Joined: 30 Jun 2013, 09:07
Location: United Kingdom

Re: /quit (Quit the server showing a reason)

Postby Clowny » 25 Jul 2013, 16:58

Breakdown901 wrote:Nice, but this will increase your kicks, which would not look good if applying for staff on a server. Is ther maybe some sort of disconnect event? Like p.Disconnect or something? Anyways, nice :)

Yeah.. thats the problem I had with my /ragequit I wonder if there is a disconnect event there should be.
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53

Re: /quit (Quit the server showing a reason)

Postby Warren1001 » 25 Jul 2013, 18:51

If you judge your ranking by the kicks on the server, that's not very smart... Slow connection is a kick...
Warren1001
 
Posts: 197
Joined: 08 Aug 2012, 03:50

Re: /quit (Quit the server showing a reason)

Postby Clowny » 26 Jul 2013, 03:00

Warren1001 wrote:If you judge your ranking by the kicks on the server, that's not very smart... Slow connection is a kick...

true.. I don't think ranks should be judged with kicks in the first place
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53

Re: /quit (Quit the server showing a reason)

Postby joppiesaus » 26 Jul 2013, 09:02

Nice made!
It has only one disadvantage: You will get kicked instead of disconnected.
For kick you can give a reason, but for disconnecting not.
if you want it just disconnect, you can leave the reason for disconneting in the chat for other people, but the quitter doesn't get the message.
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: /quit (Quit the server showing a reason)

Postby ane200055 » 26 Jul 2013, 12:37

One of the things that gave me the idea to make this command was from the /part command in IRC.
Also I have seen it this idea on servers so then I come to some thinking, I was thinking *Maybe I could make something like this for MCDzienny* so I did.

And I think this would be a good way to leave a server. :)
Website: http://ane200055.co.vu
The Developer of The XtraIRC IRC Client: http://xtrairc.tk
C# coder.
User avatar
ane200055
 
Posts: 98
Joined: 30 Jun 2013, 09:07
Location: United Kingdom


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 4 guests

cron