These are chat archives for TheHolyWaffle/TeamSpeak-3-Java-API

28th
Jan 2017
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:33
How to use the TextMessageEvent an argument such as
If (message.eqauls ("! Report" + argument)) {
insert ?
Roger Baumgartner
@rogermb
Jan 28 2017 19:33
Use event.getMessage()
Or what exactly do you mean? Are you asking about string manipulation?
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:34
@rogermb Yes, But I would like to have a game name where the argument is.
Roger Baumgartner
@rogermb
Jan 28 2017 19:37
Use String#startsWith and String#substring
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:40
It does not work.
Roger Baumgartner
@rogermb
Jan 28 2017 19:41
What does not work?
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:41
                                if(message.startsWith("!report " + name)) {
Name is a String.
Roger Baumgartner
@rogermb
Jan 28 2017 19:42
Nah, just use message.startsWith("!report ")
That way you know the message starts with "!report ", now you only need to cut off that first part and you know who the client wanted to report
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:42
Yes, But a message is sent to a server group where the string must be played back.
Roger Baumgartner
@rogermb
Jan 28 2017 19:43
String name = message.substring("!report ".length())

where the string must be played back

"played back"?

JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:43
Thank You very much, my last questions how can i get the Client Channel Name.
Roger Baumgartner
@rogermb
Jan 28 2017 19:44
"The name of the channel the client is currently in"?
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:44
Yes
Roger Baumgartner
@rogermb
Jan 28 2017 19:45
int clientId = ...
ClientInfo client = api.getClientInfo(clientId);
int channelId = client.getChannelId();
ChannelInfo channel = api.getChannelInfo(channelId);
String channelName = channel.getName();
JenkePlays
@JenkePlays_twitter
Jan 28 2017 19:48
Thank You, its works.
Roger Baumgartner
@rogermb
Jan 28 2017 19:48
Yay :smile:
JenkePlays
@JenkePlays_twitter
Jan 28 2017 21:57
How to get all players of a Teampeak without api.getClients (); From?
Roger Baumgartner
@rogermb
Jan 28 2017 21:58
... you just use TS3Api#getClients. Why would you not want to use that method that does exactly what you need it to do?
JenkePlays
@JenkePlays_twitter
Jan 28 2017 21:59
I want to have from all clients the server group and only the people who are in a certain group but without api.getClients (); Because it takes too long to get all the clients through.
Roger Baumgartner
@rogermb
Jan 28 2017 22:00
If it takes too long you're doing something wrong. Apart from that: TS3Api#getServerGroupClients(int), where the parameter is the ID of the server group you're interested in.
JenkePlays
@JenkePlays_twitter
Jan 28 2017 22:07
for (Client client : api.getClients()) {
if (client.isInServerGroup(20) || client.isInServerGroup(24) || client.isInServerGroup(21) || client.isInServerGroup(22)) {
I make this so
Roger Baumgartner
@rogermb
Jan 28 2017 22:10
Sure, and what are you doing with each of these clients?
JenkePlays
@JenkePlays_twitter
Jan 28 2017 22:10
Iam poke the Clients
Roger Baumgartner
@rogermb
Jan 28 2017 22:13

And that's what takes most of the time - no matter whether you're using TS3Api#getClients() or TS3Api#getServerGroupClients(int)

Actually, getClients is most likely faster if you have to check multiple server groups as it only involves a single API call

By default, TS3 servers only allow you to send 3 commands per second. That's why poking several people takes so long.
JenkePlays
@JenkePlays_twitter
Jan 28 2017 22:14
And there is no solution to make it faster?
Roger Baumgartner
@rogermb
Jan 28 2017 22:14
If you need faster rates than that, you need to whitelist the IP of your server query and then use FloodRate.UNLIMITED
For the former, look it up in the TS3 manual. The latter: Read through the README file of our API.
JenkePlays
@JenkePlays_twitter
Jan 28 2017 22:16
How can I find tge IO of my Server Query ?
Roger Baumgartner
@rogermb
Jan 28 2017 22:17
Run this from the computer you run your query from
Or if you run the query on the same machine as your server, you don't need to whitelist it
JenkePlays
@JenkePlays_twitter
Jan 28 2017 22:18
How can I make the FloodRate Unlimited ?
Roger Baumgartner
@rogermb
Jan 28 2017 22:19
TS3Config#setFloodRate
JenkePlays
@JenkePlays_twitter
Jan 28 2017 22:21
Thank You its work.