Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 13 21:03
    rogermb commented #342
  • Oct 13 21:01
    DanielAlves123 commented #342
  • Oct 13 20:55
    DanielAlves123 closed #342
  • Oct 13 20:55
    DanielAlves123 commented #342
  • Oct 13 17:17
    rogermb commented #342
  • Oct 13 17:17
    rogermb labeled #342
  • Oct 13 11:52
    DanielAlves123 opened #342
  • Oct 09 11:39
    mnjg123 closed #305
  • Sep 14 21:26
    rogermb commented #339
  • Sep 14 21:24
    sgebauer commented #339
  • Sep 14 20:11
    rogermb commented #339
  • Sep 14 20:07
    sgebauer commented #339
  • Aug 31 12:36
    rogermb commented #341
  • Aug 31 12:35
    NewJavaDeveloper closed #341
  • Aug 31 12:35
    NewJavaDeveloper commented #341
  • Aug 31 12:05
    rogermb commented #341
  • Aug 31 12:03
    rogermb commented #341
  • Aug 31 11:45
    NewJavaDeveloper edited #341
  • Aug 31 11:44
    NewJavaDeveloper opened #341
  • Aug 16 15:31
    akaJonas opened #340
Roger Baumgartner
@rogermb
You still didn't put in a correct argument
channel_maxclients=
should be something like channel_maxclients=123
JenkePlays
@JenkePlays_twitter
Now i became this Error:
[2017-11-03 21:03:11.330] > channeledit cid=22 channel_maxclients=channel_maxclients=0
[2017-11-03 21:03:11.340] [channeledit] < error id=1540 msg=convert\serror
[2017-11-03 21:03:11.340] [SEVERE] TS3 command error: {msg=convert error, id=1540}
Roger Baumgartner
@rogermb
Sounds like I need to test some stuff. I'll get back to you asap
Roger Baumgartner
@rogermb
Please excuse the strange log format. I'm getting
[channeledit] > channeledit cid=5 channel_maxclients=12
[channeledit] < error id=0 msg=ok
Oh, apparently I'm blind
@JenkePlays_twitter Your argument string should be something along the lines of "12", and not "channel_maxclients=12"
Steven Mernberger
@StevenMernberg1_twitter
Hi, I want to get the Client Nickname on the "onClientMoved" Event. How is this possible ?
Roger Baumgartner
@rogermb
@StevenMernberg1_twitter Hi! You're right that the nickname is not included in the event itself. Fortunately, it includes the client's ID, which we can use to look up more information about the client using TS3Api:
@Override
public void onClientMoved(ClientMovedEvent e) {
    int clientId = e.getClientId();
    ClientInfo client = api.getClientInfo(clientId);
    if (client == null) {
        return; // The client has already left the server
    } else {
        System.out.println(client.getNickname());
    }
}
Steven Mernberger
@StevenMernberg1_twitter
Ok thank you.
Steven Mernberger
@StevenMernberg1_twitter
And I
Steven Mernberger
@StevenMernberg1_twitter
And how can I get a specific Channel with its ID ?
Roger Baumgartner
@rogermb
api.getChannelInfo(channelId)
Steven Mernberger
@StevenMernberg1_twitter
Thanks
Roger Baumgartner
@rogermb
You're welcome :blush:
Steven Mernberger
@StevenMernberg1_twitter
And I want to query if someone is in the channel, how does it work?
Roger Baumgartner
@rogermb
If you're looking for someone specific, you could do api.getClientInfo(clientId).getChannelId() and compare that to a known channel ID value
But if you want to get all clients in a specific channel, you need to get all clients (api.getClients()) and just take those ones whose channel ID matches
Since the server query API does not contain a command to just get the clients in one specific channel
Steven Mernberger
@StevenMernberg1_twitter
No I have a support-queue an when s.o. goes in and a supporter would be online so, the client who's gone into the support-queue should be moved in one of the five support-channels and I need to query whether the channels are empty and then I want to move him in an not occupied channel.
Roger Baumgartner
@rogermb
Hmm, if those channels do not have any child channels, you could do api.getChannelInfo(yourChannelId).isFamilyEmpty()
Steven Mernberger
@StevenMernberg1_twitter
Ok It works. Thank you
Roger Baumgartner
@rogermb
Glad to hear it works :)
astrolamb-gaming
@astrolamb-gaming
So I got the following error:
[[TeamSpeak-3-Java-API] SocketReader] ERROR com.github.theholywaffle.teamspeak3.SocketReader - Connection closed by the server. [[TeamSpeak-3-Java-API] SocketReader] WARN com.github.theholywaffle.teamspeak3.SocketReader - SocketReader has stopped! [pool-1-thread-1] ERROR com.github.theholywaffle.teamspeak3.api.reconnect.DisconnectingConnectionHandler - [Connection] Disconnected from TS3 server [main] ERROR com.github.theholywaffle.teamspeak3.TS3Query - Command quit was not answered in time.
Does this mean that the server kicked the query?
Roger Baumgartner
@rogermb
Either that, or the server was shut down, or there's a bug in the API
This can also happen if you set the flood rate to UNLIMITED, but are not actually whitelisted on the TS3 server. In that case you'll also temporarily get banned for 10 minutes.
astrolamb-gaming
@astrolamb-gaming
I have a client connection to the server, and flood rate is DEFAULT,s o those aren't the issues.
Roger Baumgartner
@rogermb
Are there more entries in the log before that error message?
astrolamb-gaming
@astrolamb-gaming
Nope. I connect, and it almost immediately returns that error message. Can a server be set to refuse queries? Seems like that might be the case.
Roger Baumgartner
@rogermb
Hmm, not sure. Can you turn on communications logging (see here) and send me the full console output?
astrolamb-gaming
@astrolamb-gaming
Communications logging already was enabled. I think it might be the wrong port. I have a friend who started a server yesterday who's letting me do testing until I get access to the server this is for, so I'll do some testing this evening. The default port worked fine for his server.
Roger Baumgartner
@rogermb
Could you still send me the full communications log, then?
Or is what you've previously sent me literally all there was? :stuck_out_tongue:
astrolamb-gaming
@astrolamb-gaming
That's all there was.
Roger Baumgartner
@rogermb
Alright, that would mean that the server didn't even send the welcome message
With that in mind, a wrong port certainly sounds likely
Did you just use port 10011?
astrolamb-gaming
@astrolamb-gaming
I tried that, and when it wasn't working I actually tried to iterate through all the ports. 5 of them connected but were kicked with the error message above. Another 4 connected without issues, but returned the following error when I tried TS3Api#setNickname():
[[TeamSpeak-3-Java-API] SocketReader] WARN com.github.theholywaffle.teamspeak3.SocketReader - TS3 command error: {msg=invalid serverID, id=1024}
Roger Baumgartner
@rogermb
Ooh, that port is the correct server query port, then!
astrolamb-gaming
@astrolamb-gaming
There's 4 of them?
Henny022
@Henny022
you need to select a virtual server first i think
Roger Baumgartner
@rogermb
To set your own nickname, you need to be on the correct (or any, really) virtual server
So after connecting, you'll need to use selectVirtualServerById or selectVirtualServerByPort
If you know the voice port, the latter is probably the better idea.
But if the TS3 server is self-hosted (thus only runs 1 virtual server), selectVirtualServerById(1) would work just as well
Basically: If you're getting a "TS3 command error", you already know the correct IP and server query port. Now you only need to figure out the correct virtual server ID / voice port
astrolamb-gaming
@astrolamb-gaming
I have the voice port. But selectVirtualServerByPort(port) returns the same error.
Henny022
@Henny022
then try one of the other working ports
Roger Baumgartner
@rogermb
Are you issuing any other commands before calling selectVirtualServerByX?