From 869ca4a4d898521b187bbbb513cda5a5d83778a9 Mon Sep 17 00:00:00 2001 From: xCausxn Date: Sat, 18 Jul 2015 23:09:36 +0100 Subject: [PATCH] Fix for maxclients on Quake2 --- protocols/quake2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocols/quake2.js b/protocols/quake2.js index 802ad87..e4631e8 100644 --- a/protocols/quake2.js +++ b/protocols/quake2.js @@ -12,7 +12,7 @@ module.exports = require('./core').extend({ this.udpSend('\xff\xff\xff\xff'+this.sendHeader+'\x00',function(buffer) { var reader = self.reader(buffer); - + var header = reader.string({length:4}); if(header != '\xff\xff\xff\xff') return; @@ -76,6 +76,7 @@ module.exports = require('./core').extend({ if('g_needpass' in state.raw) state.password = state.raw.g_needpass; if('mapname' in state.raw) state.map = state.raw.mapname; if('sv_maxclients' in state.raw) state.maxplayers = state.raw.sv_maxclients; + if('maxclients' in state.raw) state.maxplayers = state.raw.maxclients; if('sv_hostname' in state.raw) state.name = state.raw.sv_hostname; self.finish(state);