mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
More async
This commit is contained in:
parent
29ce0b82d0
commit
e937c725bb
20 changed files with 100 additions and 86 deletions
|
|
@ -2,6 +2,8 @@ const Core = require('./core');
|
|||
|
||||
class Teamspeak2 extends Core {
|
||||
async run(state) {
|
||||
const queryPort = this.options.teamspeakQueryPort || 51234;
|
||||
|
||||
await this.withTcp(async socket => {
|
||||
{
|
||||
const data = await this.sendCommand(socket, 'sel '+this.options.port);
|
||||
|
|
@ -55,7 +57,7 @@ class Teamspeak2 extends Core {
|
|||
state.raw.channels.push(channel);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, queryPort);
|
||||
}
|
||||
|
||||
async sendCommand(socket,cmd) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue