Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
404 stars 136 forks source link

Teamspeak3 - Custom master server port #126

Closed ceribik closed 10 years ago

ceribik commented 10 years ago

Could an option be added for using a custom "master server" (i.e. query) port?

My server provider uses port 9987 as their master query port for all their teamspeak3 servers and there doesn't appear to be a way to override the value set in the ts3 class:

$master_server_port = 10011;

This is the array I'm passing in:

array(
    'type' => 'teamspeak3',
    'host' => '118.127.0.67:10347', 
    'id' => 'teamspeak',  )

(If I use this array and set $master_server_port to 9987 in the ts3 class, it works fine.)

Perhaps you could allow for this functionality via the options array which is already part of the GameQ core, e.g.:

    'options' => array('master_server_port' => '9987')
Austinb commented 10 years ago

Additional syntax for addServer for teamspeak 3 with a non-default master port is as follows:

$gq->addServer(array(
        'type' => 'teamspeak3',
        'host' => '118.127.0.67:10347',
        'options' => array(
                'master_server_port' => 9987,
                ),
));

Commit coming shortly.