From 6e50863eaaef810d15afeed4817e39fe50c7c54b Mon Sep 17 00:00:00 2001 From: deathcap Date: Sat, 23 Jan 2016 12:00:17 -0800 Subject: [PATCH] Append \0\FML\0 to hostname in set_protocol packet if Forge enabled http://wiki.vg/User:Pokechu22/Forge#Connection_to_a_forge_server --- src/createClient.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/createClient.js b/src/createClient.js index 83dc1b7..6fb1ba9 100644 --- a/src/createClient.js +++ b/src/createClient.js @@ -90,9 +90,12 @@ function createClient(options) { return client; function onConnect() { + var taggedHost = host; + if (options.forge) taggedHost += '\0FML\0'; + client.write('set_protocol', { protocolVersion: version.version, - serverHost: host, + serverHost: taggedHost, serverPort: port, nextState: 2 });