Client info call

This commit is contained in:
Manevolent
2018-08-04 23:10:14 -04:00
parent 95adfc6e3d
commit 07ca284851
2 changed files with 22 additions and 1 deletions
@@ -768,6 +768,23 @@ public class LocalTeamspeakClientSocket
executeCommand(command).complete();
}
public void subscribeAll() throws IOException, TimeoutException, ExecutionException, InterruptedException {
Command command = new SingleCommand("channelsubscribeall", ProtocolRole.CLIENT);
executeCommand(command).get();
}
public Client getClientInfo(int clientId)
throws IOException, TimeoutException, ExecutionException, InterruptedException {
Command command = new SingleCommand(
"clientinfo",
ProtocolRole.CLIENT,
new CommandSingleParameter("clid", Integer.toString(clientId))
);
Iterable<Client> clients = executeCommand(command, x -> new Client(x.toMap())).get();
return clients.iterator().next();
}
public void disconnect()
throws
IOException, TimeoutException,
@@ -786,5 +803,4 @@ public class LocalTeamspeakClientSocket
}
}
}