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

Add `clientGetByIpAddress()` function #185

Closed Sebbo94BY closed 1 year ago

Sebbo94BY commented 1 year ago

Adds a clientGetByIpAddress() function equivalent to the other clientGetBy* functions.

Not sure, if we want to throw a different ServerQueryException here.

svenpaulsen commented 1 year ago

Since the IP address is not unique and multiple clients might match, I'd recommend using the clientList() filter to achieve this.

Sebbo94BY commented 1 year ago

Good points. Thanks for the hint regarding the filter. I've overseen this.

Is there anywhere an example how to use this filter? I've took a quick look at the filter function, but I'm not fully sure about the usage. :sweat_smile:

Is it simply like this? clientList(['connection_client_ip' => '192.168.2.17'])