Get wom direct link

For all mod-related questions and custom code.
Post Reply
User avatar
boblol0909
SupOP
Offline
Posts: 314
Joined: June 24th, 2011, 10:27 pm

Get wom direct link

Post 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());
        }

User avatar
Hellenion
Offline
Posts: 220
Joined: October 20th, 2011, 9:20 am
Location: Subnet
Contact:

Re: Get wom direct link

Post 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.
A = {x ∈ P(U) | x ∉ x}
Mods:
  1. /Su - Allows players to temporarily become a different rank
  2. /Snap - Like /Line but only draws straight or diagonal lines.
  3. pre-0.630 skip/none block

User avatar
boblol0909
SupOP
Offline
Posts: 314
Joined: June 24th, 2011, 10:27 pm

Re: Get wom direct link

Post by boblol0909 »

Type it?

BobKare
Offline
Posts: 279
Joined: May 26th, 2011, 2:15 pm

Re: Get wom direct link

Post by BobKare »

Useful for the server owner, who can easily get the Direct URL in his console.

Jonty800
Offline
Posts: 280
Joined: August 21st, 2011, 6:31 am
Location: United Kingdom
Contact:

Re: Get wom direct link

Post by Jonty800 »

What? The console already has a url in the servergui. (Not mc:// but blah)
You cannot use certain BBCodes: [img].

BobKare
Offline
Posts: 279
Joined: May 26th, 2011, 2:15 pm

Re: Get wom direct link

Post by BobKare »

Jonty800 wrote:(Not mc:// but blah)
Exactly. I was talking about the WoM Direct link.

User avatar
OfficerFlake
Offline
Posts: 25
Joined: May 28th, 2012, 12:03 am

Re: Get wom direct link

Post 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)
=== MeinKraft 24/7 ===
Server Owner & Code Developer

Post Reply