Add tagHost option, clients can use to append to set_protocol serverHost

This is used by Forge clients to tell the server they support FML|HS,
otherwise the server will kick with "you must have FML/Forge installed".
This commit is contained in:
deathcap 2016-01-24 11:11:47 -08:00
parent 92b6c3778b
commit 93c5c7315a
2 changed files with 2 additions and 1 deletions

View file

@ -24,6 +24,7 @@ mc.ping({host, port}, function(err, response) {
console.log('Using forgeMods:',forgeMods);
var client = mc.createClient({
tagHost: '\0FML\0', // signifies client supports FML/Forge
forge: true,
forgeMods: forgeMods,
// Client/server mods installed on the client

View file

@ -102,7 +102,7 @@ function createClient(options) {
function onConnect() {
var taggedHost = host;
if (options.forge) taggedHost += '\0FML\0';
if (options.tagHost) taggedHost += options.tagHost;
client.write('set_protocol', {
protocolVersion: version.version,