Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Update SSH support and performance stuff #62

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
5 changes: 2 additions & 3 deletions examples/clientkick.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
#build a new ts3admin object
$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);

if($tsAdmin->getElement('success', $tsAdmin->connect())) {
#login as serveradmin
$tsAdmin->login($ts3_user, $ts3_pass);
#login as serveradmin
if($tsAdmin->getElement('success', $tsAdmin->connect($ts3_user, $ts3_pass))) {

#select teamspeakserver
$tsAdmin->selectServer($ts3_port);
Expand Down
5 changes: 2 additions & 3 deletions examples/clientlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
#build a new ts3admin object
$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);

if($tsAdmin->getElement('success', $tsAdmin->connect())) {
#login as serveradmin
$tsAdmin->login($ts3_user, $ts3_pass);
#login as serveradmin
if($tsAdmin->getElement('success', $tsAdmin->connect($ts3_user, $ts3_pass))) {

#select teamspeakserver
$tsAdmin->selectServer($ts3_port);
Expand Down
7 changes: 3 additions & 4 deletions examples/clientlist_with_avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
#build a new ts3admin object
$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);

if($tsAdmin->getElement('success', $tsAdmin->connect())) {
#login as serveradmin
$tsAdmin->login($ts3_user, $ts3_pass);

#login as serveradmin
if($tsAdmin->getElement('success', $tsAdmin->connect($ts3_user, $ts3_pass))) {

#select teamspeakserver
$tsAdmin->selectServer($ts3_port);

Expand Down
5 changes: 2 additions & 3 deletions examples/serverlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
#build a new ts3admin object
$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);

if($tsAdmin->getElement('success', $tsAdmin->connect())) {
#login as serveradmin
$tsAdmin->login($ts3_user, $ts3_pass);
#login as serveradmin
if($tsAdmin->getElement('success', $tsAdmin->connect($ts3_user, $ts3_pass))) {

#get serverlist
$servers = $tsAdmin->serverList();
Expand Down
8 changes: 3 additions & 5 deletions examples/viewreturn.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$ts3_ip = '127.0.0.1';
$ts3_queryport = 10011;
$ts3_port = 9987; // Set 0 if you don't want to select a server
$ts3_user = 'serveradmin'; // leave blank if you want to execute your command as a guest
$ts3_user = 'serveradmin';
$ts3_pass = 'password';
/*----------------------*/

Expand Down Expand Up @@ -99,10 +99,8 @@ function array2table($array) {

$html = '';

if($tsAdmin->getElement('success', $tsAdmin->connect())) {

#login if username is given
if(!empty($ts3_user)) { $tsAdmin->login($ts3_user, $ts3_pass); }
#login
if($tsAdmin->getElement('success', $tsAdmin->connect($ts3_user, $ts3_pass))) {

#select teamspeakserver if needed
if($ts3_port != 0) { $tsAdmin->selectServer($ts3_port); }
Expand Down
Loading