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

13th
Jun 2016
undefin3d
@undefin3d___twitter
Jun 13 2016 20:04
Guys i want the bot reconnects when the server crash, how i can do that?
Roger Baumgartner
@rogermb
Jun 13 2016 20:06
@undefin3d___twitter You'll first need a snapshot build of the API. Then follow the example provided here :smile:
undefin3d
@undefin3d___twitter
Jun 13 2016 20:34
@Firedroide
My code doesnt work if i send you a pastebin can you check it?
Roger Baumgartner
@rogermb
Jun 13 2016 20:34
sure
and can you tell me what exactly doesn't work as well?
undefin3d
@undefin3d___twitter
Jun 13 2016 20:36
the reconnect system xD
Roger Baumgartner
@rogermb
Jun 13 2016 20:37
and what exactly doesn't work? Are there any compile errors? Runtime errors? Unexpected behavior?
undefin3d
@undefin3d___twitter
Jun 13 2016 20:38
all works but when i stop the server the bot doesnt reconnect
i sent you a pvt message with pastebin link
Roger Baumgartner
@rogermb
Jun 13 2016 20:39
Saw that, thanks :smile:
undefin3d
@undefin3d___twitter
Jun 13 2016 20:40
thanks you too :)
Roger Baumgartner
@rogermb
Jun 13 2016 20:44

I downloaded your code and ran it on my machine

[2016-06-13 22:43:30.101] [servernotifyregister] < error id=0 msg=ok
[2016-06-13 22:43:39.546] < [event] notifyclientleftview cfid=1 ctid=0 reasonid=11 reasonmsg=Server\sShutdown! clid=2
[2016-06-13 22:43:40.450] [WARNING] Connection closed by the server.
[2016-06-13 22:43:40.450] [WARNING] SocketReader has stopped!
[2016-06-13 22:43:40.459] [Connection] Disconnected from TS3 server
[2016-06-13 22:43:42.963] [Connection] Failed to reconnect - waiting 1500ms until next attempt
[2016-06-13 22:43:46.215] [Connection] Failed to reconnect - waiting 2250ms until next attempt
[2016-06-13 22:43:50.101] < TS3
[2016-06-13 22:43:50.101] < 
[2016-06-13 22:43:50.101] < Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
[2016-06-13 22:43:50.101] < 
[2016-06-13 22:43:50.102] > login serveradmin password
[2016-06-13 22:43:50.103] [login] < error id=0 msg=ok
[2016-06-13 22:43:50.153] > use port=9987

For me it reconnects without any problems

undefin3d
@undefin3d___twitter
Jun 13 2016 20:48
for me doest work it say
[2016-06-13 22:45:58.511] < [event] notifyclientleftview cfid=1 ctid=0 reasonid=11 reasonmsg=Server\sShutdown! clid=2
[2016-06-13 22:46:54.226] > whoami
[2016-06-13 22:46:54.314] [whoami] < virtualserver_status=unknown virtualserver_unique_identifier virtualserver_port=0 virtualserver_id=0 client_id=0 client_channel_id=0 client_nickname client_database_id=1 client_login_name=serveradmin client_unique_identifier=serveradmin client_origin_server_id=0
[2016-06-13 22:46:54.543] [whoami] < error id=0 msg=ok
[2016-06-13 22:47:54.242] > whoami
[2016-06-13 22:47:54.331] [whoami] < virtualserver_status=unknown virtualserver_unique_identifier virtualserver_port=0 virtualserver_id=0 client_id=0 client_channel_id=0 client_nickname client_database_id=1 client_login_name=serveradmin client_unique_identifier=serveradmin client_origin_server_id=0
[2016-06-13 22:47:54.552] [whoami] < error id=0 msg=ok
Roger Baumgartner
@rogermb
Jun 13 2016 20:49
use ``` for a block comment
hmmm... I don't even see any messages about it being disconnected there
like, you shut down the server, but you're still getting correct responses to your whoami commands?
Do you have 2 servers running concurrently or something like that?
undefin3d
@undefin3d___twitter
Jun 13 2016 20:51
yes i stopped that on yatqa
i stopped the virtual server
Roger Baumgartner
@rogermb
Jun 13 2016 20:52
stopping the virtual server doesn't make your server query disconnect
so that whole reconnect feature won't do anything for you
it's intended for physical disconnections, like when your internet connection stops working for a few minutes
undefin3d
@undefin3d___twitter
Jun 13 2016 20:53
mmm, so if my server gets dossed the bot will reconnect?
Roger Baumgartner
@rogermb
Jun 13 2016 20:54
it should, yeah. But I've never actually tested that
do your servers get DDoSed often or why is that use case of particular importance to you?
undefin3d
@undefin3d___twitter
Jun 13 2016 20:55
my actual server gets ddosed often, but next month i will upgrade my servers
i can test it in 48h xD
Roger Baumgartner
@rogermb
Jun 13 2016 20:55
alright, I'd love to hear whether it actually works :smile:
undefin3d
@undefin3d___twitter
Jun 13 2016 20:56
so now i will deploy the bot in that server and "hope" someone dos it ahaha
thanks you @Firedroide
:)
Roger Baumgartner
@rogermb
Jun 13 2016 20:57
You're welcome! :smile:
Oh, and @undefin3d___twitter if you're still here, remember to save the logs :smile:
undefin3d
@undefin3d___twitter
Jun 13 2016 20:59
Ok :D