mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Add support for teamspeak 3
This commit is contained in:
parent
422a316853
commit
16ef96fccf
3 changed files with 87 additions and 2 deletions
|
|
@ -25,8 +25,8 @@ module.exports = require('./protocols/core').extend({
|
|||
var split = data.split('\r\n');
|
||||
split.forEach(function(line) {
|
||||
var equals = line.indexOf('=');
|
||||
var key = line.substr(0,equals);
|
||||
var value = line.substr(equals+1);
|
||||
var key = equals == -1 ? line : line.substr(0,equals);
|
||||
var value = equals == -1 ? '' : line.substr(equals+1);
|
||||
state.raw[key] = value;
|
||||
});
|
||||
c();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue