antoine-pous / node-teamspeak3-client

😱 A TeamSpeak3 ServerQuery client with anti-ban feature, prepared statements and a lot of cool stuffs
ISC License
5 stars 0 forks source link

Multiple instances #5

Closed XeroxDev closed 6 years ago

XeroxDev commented 7 years ago

Hey, I'm again.

I have a second question / issue :D

Is it possible to add multiple instances.

Example: I have 2 User and they got all new User(); and in this user class is a variable named server they are connected to the same server.

Now my problem / question..

If one user want now to logout, the other person get messages with the error: "1024 'invalid serverID' undefined", the query stay connected but is now not more reachable and then, if he want to logout, came the message: "alreaddy logged out"

Is it possible to give every user a own TeamSpeak3 class / own server query?

Kind regards XeroxDev

antoine-pous commented 7 years ago

When many clients use the same query account when one of them logout the others are disconnected. This is a well known limitation and the TS3 devs haven't yet announced a date to fix it.

XeroxDev commented 7 years ago

Ok, then I will make a lock for "Multi-Logins", but thanks for the answer! :)

antoine-pous commented 7 years ago

Each user can use his own serverquery account instead of the serveradmin account. This is the best way to avoid problems with permissions. With this approach you can use multi-logins and associate them to local data like expressjs sessions.

XeroxDev commented 7 years ago

Thanks for this tip :)

XeroxDev commented 7 years ago

When many clients use the same query account when one of them logout the others are disconnected. This is a well known limitation and the TS3 devs haven't yet announced a date to fix it.

I has tested this theorie. If I connect with telnet to my server with 2 windows of putty and then logout with one, the other console is not effected to this, stay logged in and get the messages.

Can you maybe check this out?

antoine-pous commented 7 years ago

Can you provide a sample of your code about this issue?

XeroxDev commented 7 years ago

How it works: Open Putty 2 times: Connect with both to Server, login and use server (1) Execute an command (example: channellist) Logout with one console execute with the other console the command again. -You can see, it will work.

And with your API I have it so: https://pastebin.com/kE0Xz8Qx

antoine-pous commented 7 years ago

I can't access to your pastebin

XeroxDev commented 7 years ago

I can't access to your pastebin

Now you can, sorry, I had it on private.

XeroxDev commented 7 years ago

Did you find any misstake in my script?

antoine-pous commented 7 years ago

You haven't mistake in your code. My package return the same instance each time. I'm currently working on a whole new project orientation.

The next packages should be better ;)

XeroxDev commented 7 years ago

Ok. Nice. Thank you. Then good luck :)

XeroxDev commented 7 years ago

Hey, can you say me, what's the current status is? What do you think, how long will it take?

Kind regards XeroxDev

antoine-pous commented 7 years ago

Hi,

the next big release should take some time, ill publish a hotfix for this issue before releasing the new packages.

antoine-pous commented 7 years ago

This issue should be solved, now you have to instanciate the client, see the client example for more details.

XeroxDev commented 7 years ago

Nice, thanks.

XeroxDev commented 7 years ago

Hey, sorry for this message, I updated to the hotfix and changed all so, then it normally must work, but I got the same error: 1024 'invalid serverID'

Idk why this is, I debugged everything and it's looks like so:

If User1 logged out his server param get setted to null, thats works. User2 server param stay the server, but HE get this messages although he wont be effected.

The end of the song is:

User1->Log out User1->server = null User2->"stay logged in" User2->server != null User2->Get error's and can't do anything more (No listener will work and his query client wont disconnect)

Did you maybe know, why this is so? Make I maybe this fail or why the User2 got effected from user1 login?

If you want the Source-Code again, say it to me.

Kind regards, XeroxDev

antoine-pous commented 6 years ago

I'm currently working on a whole new query client, i'll tell you when you can use it. The current problem is due to the package structure and node modules cache.

The new package will be available on @ts3/query-client in few days.

antoine-pous commented 6 years ago

This issue is fixed on the client v3.