Community Forums Today's Posts     Member List     Archive    
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Location
    England...
    Posts
    35

    TS interface error: invalid serverID

    Ok I'm still learning PHP so it could be me, but I am stumped as to why it is doing this and I think there is only one reason.

    Was the command to delete clients from a group changed in the last update?

    This no longer works :/ (See the "try" statement)

    PHP Code:
    $query "DELETE FROM tsclient WHERE id = '".$uid."';";
        
    $db_connection mysql_connect($c->db_host,$c->db_user,$c->db_pass);
            if (!
    $db_connection) {
                die(
    $errmsg['ERR_MYSQL']);
            }
        
    $db_selection mysql_select_db($c->db_name,$db_connection);
            if (!
    $db_selection) {
                echo 
    "db_name: $c->db_name <br />";
                die(
    $l->errmsg['ERR_DBFAIL']);
            }
        
    mysql_query($query,$db_connection);
        
    mysql_close($db_connection);
        
        try {
            
    $ts TeamSpeak3::factory("serverquery://".$c->tsname.":".$c->tspass."@".$c->tshost.":".$c->tsport."/");
            
    $virt $ts->serverGetByPort($c->tscport);
            
    /*if ($c->usesta == true) {
                $virt->serverGroupClientDel($c->stagroup,$cid);
            } else*/ 
    if ($alliance == $c->myname || $corp == $c->myname) {
                
    $virt->serverGroupClientDel($c->group,$cid);
            } else {
                
    $virt->serverGroupClientDel($c->stagroup,$cid);
            }
        }
        catch(
    Exception $e) {
            die(
    "TS interface error: ".$e->getMessage());
        }
        echo 
    "User ".$name." removed from TeamSpeak access. New alliance is: ".$alliance.".<br /><br />";

    functions.php
    PHP Code:
    function serverGroupClientDel($sgid$cldbid)
      {
        
    $this->execute("servergroupdelclient", array("sgid" => $sgid"cldbid" => $cldbid));
      } 
    Has the command changed or am I missing something? :/

    It's in relation to this: http://www.sev3rance.com/ts3/cron.php (May take a minute to load)

  2. #2
    Join Date
    Jun 2008
    Posts
    7,776
    Do you select the server before you try to remove someone out of a group?

  3. #3
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,299
    There was a bug within the serverGetByPort() method. Please download version 1.0.38-beta of the framework and the issue should be resolved.


  4. #4
    Join Date
    Sep 2008
    Location
    England...
    Posts
    35
    Still the same ScP

    dante it's selected and logged into here:
    PHP Code:
    $ts TeamSpeak3::factory("serverquery://".$c->tsname.":".$c->tspass."@".$c->tshost.":".$c->tsport."/"); 
            
    $virt $ts->serverGetByPort($c->tscport); 
    ScP, what "requires" should I have? atm in my functions.php I only have
    PHP Code:
    require("libraries/TeamSpeak3/TeamSpeak3.php"); 
    should I have:
    PHP Code:
    require("libraries/TeamSpeak3/Node/Servergroup.php"); 
    also? Or does TeamSpeak.php link them all?

    Edit:
    Also should
    PHP Code:
    $virt->serverGroupClientDel($c->group,$cid); 
    be
    PHP Code:
    $virt->clientDel($c->group,$cid); 
    and would it work?

    I basically need to remove user $cid from server group $c->group.

    FYI: The function in the TeamSpeak Framework is:
    PHP Code:
    /**
       * Removes a client from the server group.
       *
       * @param  integer $cldbid
       * @return void
       */
      
    public function clientDel($cldbid)
      {
        return 
    $this->getParent()->serverGroupClientDel($this->getId(), $cldbid);
      } 
    Last edited by Mavrik347; 14-10-2010 at 20:04.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. No Web Admin Interface?
    By jasarien in forum Server Support
    Replies: 8
    Last Post: 21-12-2009, 04:27
  2. Inconsistent privileges management via TCPQuery interface
    By AMREG in forum [TeamSpeak 2] Server Support
    Replies: 4
    Last Post: 19-08-2009, 08:28
  3. teamspeak + php start serverid
    By werewolf in forum [TeamSpeak 2] Server Support
    Replies: 0
    Last Post: 02-12-2008, 10:50
  4. FreeBSD and MySQL
    By Paterson in forum [TeamSpeak 2] Server Support
    Replies: 1
    Last Post: 18-01-2006, 08:35
  5. Web Interface
    By NitroSniper in forum [TeamSpeak 2] Server Support
    Replies: 3
    Last Post: 28-08-2002, 16:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •