planetteamspeak / ts3phpframework

Modern use-at-will framework that provides individual components to manage TeamSpeak 3 Server instances
https://www.planetteamspeak.com
GNU General Public License v3.0
211 stars 59 forks source link

Default client_nickname for ServerQuery #107

Closed snegrini closed 6 years ago

snegrini commented 6 years ago

Referring to #106

Changelog of server 3.4.0 (here):

Added: New parameter 'client_nickname' for the 'use' command, allows setting the nickname of query clients before they become visible on the server.

This way users on server will no longer see the default user name with current IP.

Currently, on this framework, this is reached using a trick: call client update right after a server is selected: $this->execute("clientupdate", array("client_nickname" => (string) $this->predefined_query_name));

Though the IP and the "nickname change" of a ServerQuery is still visible for clients with ServerQuery view enabled on server. I think that in TeamSpeak3_Node_Host methods serverSelect() and serverSelectByPort() should support directly this feature, removing the trick used before server 3.4.0 release.

ronindesign commented 6 years ago

Review this, I think I agree, give me some time to consider any implications of this.

svenpaulsen commented 6 years ago

I've already implemented this in my local test branch... the problem is that we'll need to remove the current clientupdate code from the serverSelect() method so it breaks the feature for old server versions.

If we make this change, the framework will no longer support server releases before 3.4.0.

svenpaulsen commented 6 years ago

I'Ve just pushed 152b807d21ee647b926d88c627a61d3c51728ac3. This will provide the client_nickname functionality, but sends an extra command (whois) after selecting a virtual server to determine whether or not we've already set the nickname.

qeekus commented 6 years ago

good work, I meant it in #106

snegrini commented 6 years ago

Great, thank you!