Server group add/del

This commit is contained in:
Manevolent
2018-08-23 11:34:27 -04:00
parent 61f35951e2
commit 4c235badd5
2 changed files with 21 additions and 1 deletions
@@ -40,7 +40,7 @@ public class PacketReassembly {
temporaryCounter.setPacketId(currentPacketId.getKey()); temporaryCounter.setPacketId(currentPacketId.getKey());
temporaryCounter.setGeneration(currentPacketId.getValue()); temporaryCounter.setGeneration(currentPacketId.getValue());
while (true) { while (queue.size() > 0) {
Pair<Integer, Integer> thisPacketId = temporaryCounter.current(); Pair<Integer, Integer> thisPacketId = temporaryCounter.current();
Packet packet = queue.get(thisPacketId.getKey()); Packet packet = queue.get(thisPacketId.getKey());
@@ -902,6 +902,26 @@ public class LocalTeamspeakClientSocket
return executeCommand(command, x -> new Client(x.toMap())).get(); return executeCommand(command, x -> new Client(x.toMap())).get();
} }
public void serverGroupAddClient(int groupId, int clientDatabaseId)
throws IOException, TimeoutException, ExecutionException, InterruptedException {
Command command = new SingleCommand("servergroupaddclient", ProtocolRole.CLIENT);
command.add(new CommandSingleParameter("sgid", Integer.toString(groupId)));
command.add(new CommandSingleParameter("cldbid", Integer.toString(clientDatabaseId)));
executeCommand(command).complete();
}
public void serverGroupRemoveClient(int groupId, int clientDatabaseId)
throws IOException, TimeoutException, ExecutionException, InterruptedException {
Command command = new SingleCommand("servergroupdelclient", ProtocolRole.CLIENT);
command.add(new CommandSingleParameter("sgid", Integer.toString(groupId)));
command.add(new CommandSingleParameter("cldbid", Integer.toString(clientDatabaseId)));
executeCommand(command).complete();
}
/** /**
* Moves one or more clients specified with clid to the channel with ID cid. If * Moves one or more clients specified with clid to the channel with ID cid. If
the target channel has a password, it needs to be specified with cpw. If the the target channel has a password, it needs to be specified with cpw. If the