MC-Market is now BuiltByBit. Read more

Teamspeak verification skript v1.0

Allows you to verify at yout teamspeak
Hey, found an old skript and decided to share a part of it.
You have to use the Teamspeak php framework: https://github.com/planetteamspeak/ts3phpframework
Here is the PhP code:
Code:
<?php

$user ="queryname";
$pass="querypassword";
$tsip="127.0.0.1";
$queryport="10011";
$serverport="9987";
$botusername="Verificationbot";
$patterns = "127.0.0.1"; //Minecraft Server ip


require_once("libraries/TeamSpeak3/TeamSpeak3.php");
$botname = array("ts_query_user_nick" => "UCP_Administrator");
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://$user:[email protected]$tsip:$queryport/?server_port=$serverport&nickname=$botusername&blocking=0");
$visitor = $_SERVER['REMOTE_ADDR'];
if ($visitor != $patterns)  {
     echo "You can not do this!", exit();
}
if(isset($_GET["group"])){
    $arr_ServerGroup = $_GET["group"];
    $uuid = $_GET["uuid"];
    $clientip = $_GET["userip"];
}       //Eingabe des Feldes in new.php
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
try
{
$dbinfo = $ts3_VirtualServer->execute("clientgetnamefromuid", array("cluid" => $uuid))->toList();

}
catch(Exception $e)
{
    die("[ERROR] not existing:" . $e->getMessage() . "\n");
}


$user_ingroup = $ts3_VirtualServer->execute("servergroupclientlist", array("sgid" => $arr_ServerGroup))->toAssocArray("cldbid");
foreach($ts3_VirtualServer->clientList() as $client)
{
if($client["client_unique_identifier"]==$uuid){
    $uip=$client['connection_client_ip'];
        if((string)$uip==(string)$clientip){
            $databaseid = $ts3_VirtualServer->execute("clientgetnamefromuid", array("cluid" => $uuid))->toList()['cldbid'];

            foreach ($user_ingroup as $key)
                if (in_array($dbinfo['cldbid'], $key))
                {
                    echo "Already verified!", exit();
                    }
         
            if ($ts3_VirtualServer->serverGroupClientAdd($arr_ServerGroup, $databaseid)){
           

            }
            echo "You are now verified!";
            exit();

         }else{
             echo "invalid ip";
             exit();
         }

}
}
echo "user not online";




?>

And here is the Skript code:
Code:
options:
    url: http://yourwebsite.com/verify/ts.php        #the page where the php file will be
    groupid: 12                                        #groupid that should be given

command /ts [<text>] [<text>]:
    aliases: teamspeak
    trigger:
        if argument 1 is "verify":
            if argument 2 is set:
                set {_ip} to "%player's ip%"
                set {_verify.url.%player%} to text from url "{@url}?group={@groupid}&uuid=%arg-2%&userip=%{_ip}%"
                if "%{_verify.url.%player%}%" contains "[ERROR] not existing:":
                    message "&e[Teamspeak] &cUID is not existing!"
                else if "%{_verify.url.%player%}%" contains "Already verified!":
                    message "&e[Teamspeak] &cYou are already verified!"
                else if "%{_verify.url.%player%}%" contains "You are now verified!":
                    message "&e[Teamspeak] &aSuccesfully verified!"
                else if "%{_verify.url.%player%}%" contains "invalid ip":
                    message "&e[Teamspeak] &cThis is not your account!"
                else if "%{_verify.url.%player%}%" contains "user not online":
                    message "&e[Teamspeak] &cYou are not online!"
                else:
                    message "&e[Teamspeak] &cAn error occured. Please contact an Admin!"
        else:
            message "&cUsage: &5/ts verify <uid>"

Just put the PhP file and the librarie on an webspace and edit the queryname etc.
Edit in the Skript file the options and add the webspace to your teamseak query whitelist.
If you have any questions...just ask^^
And yeah...I know...the PhP code is such a mess^^
It was one of my first projects several years ago.
If you want something more like tank update or clientkick/ban etc. via minecraft just send me a pm.
Could do it in java too if you want.
EULA: Standard EULA
734 Views
29 Downloads
Not yet rated
Sep 19, 2017 Published
Type
  1. Skript
Author
Recommended for you
✅ 1000 Server Owners Trust This Configuration 1️⃣ TOP 1 BuiltByBit ShopGuiPlus Configuration ✅
5.00 star(s) 60 ratings
967 purchases
Want to find a perfect and detailed solution to your McMMO GUI? You’ve come to the right place!
5.00 star(s) 11 ratings
448 purchases
Whats your server missing you ask? A awesome BattlePass config is the Correct answer
5.00 star(s) 15 ratings
414 purchases
Extreme spam/swear filter configuration for chat protection. (Hard to bypass!)
4.50 star(s) 15 ratings
294 purchases
Top
You need to upgrade!
Our dark style is reserved for our Premium members. Upgrade here.