Page 1 of 1

Get wom direct link

Posted: September 29th, 2012, 10:30 pm
by boblol0909
Command to give players their wom direct link.

Code: Select all

static readonly CommandDescriptor CdWomDirect = new CommandDescriptor
        {
            Name = "getwom",
            Aliases = new[] { "getlink", "getdirect" },
            Category = CommandCategory.Info,
            UsableByFrozenPlayers = true,
            Help = "Gets your wom direct connect link.",
            Handler = WomDirectHandler
        };

        internal static void WomDirectHandler(Player player, Command cmd) {
            StringBuilder sb = new StringBuilder();
            sb.AppendFormat("mc://{0}:{1}/{2}/", Server.ExternalIP, Server.Port, player.Name);
            foreach (byte b in System.Security.Cryptography.MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(Heartbeat.Salt + player.Name))) {
                sb.AppendFormat("{0:x2}", b);
            }
            player.Message("Your WOM direct connect link:");
            player.Message(sb.ToString());
        }

Re: Get wom direct link

Posted: September 30th, 2012, 12:52 pm
by Hellenion
This is, of course, very secure.

So the link appears as a server message to a player, then what? You can't copypaste from minecraft.

Re: Get wom direct link

Posted: September 30th, 2012, 7:17 pm
by boblol0909
Type it?

Re: Get wom direct link

Posted: September 30th, 2012, 9:15 pm
by BobKare
Useful for the server owner, who can easily get the Direct URL in his console.

Re: Get wom direct link

Posted: October 1st, 2012, 8:25 am
by Jonty800
What? The console already has a url in the servergui. (Not mc:// but blah)

Re: Get wom direct link

Posted: October 1st, 2012, 5:43 pm
by BobKare
Jonty800 wrote:(Not mc:// but blah)
Exactly. I was talking about the WoM Direct link.

Re: Get wom direct link

Posted: October 3rd, 2012, 12:47 am
by OfficerFlake
If I'm having issues with MC.net and wom, I do this (as I am on 127.0.0.1)

mc://127.0.0.1/OfficerFlake/blahblahblah

you bypass the test as you are on localhost (though, this won't work with strict authentication testing)