CynCeyd / TS3BridgeTTT

A simple bridge between TeamSpeak 3 and GMod TTT
GNU General Public License v3.0
6 stars 6 forks source link

Automatic Steam-ID-Sync ? #1

Closed FelixGerberding closed 6 years ago

FelixGerberding commented 7 years ago

Hey there,

For some reason, the script kicks every user trying to connect to the server for

No linked user account

How can I fix this ? Do i really need to insert every players Steam-ID into the links.json ?

CynCeyd commented 7 years ago

Hi,

I'm very sorry that I didn't have the chance to answer here yet.

Unfortunately currently this is necessary, yes. In a future version I could implement the option to automatically synchronize the TeamSpeak name with the Steam ID, but there might be issues, as people can choose their name randomly in TeamSpeak and it does not have to match the Steam name and thus Steam ID.

I'll think about this and perhaps I find some way to fix this issue.

FelixGerberding commented 7 years ago

You could also push the IP-Adress to the Web-Script so you can get the Teamspeak-UUID via IP.

CynCeyd commented 7 years ago

That would be a great way to solve this issue. I'll take a look on that.

FelixGerberding commented 7 years ago
<?php
include ('config.php');
require_once("TeamSpeak3.php");

$connect = "serverquery://".$UserAdmin.":".$PWQuery."@".$IP_TS.":".$QueryPort."/?server_port=".$TSPort."";
    $ts3 = TeamSpeak3::factory($connect);
    $ts3->execute("clientupdate", array("client_nickname" => $nickname));
    foreach ($ts3->clientList(array('client_type' => '0', 'connection_client_ip' => $ClientIP)) as $client) {
        $clientuid = $client->client_unique_identifier;
        break;
    }

This is how you can get the UUID via IP ^^ It would be the best to write the connections into a file, as there might be multiple players playing at once, which have the same IP-Adress.

I may create a pull-request, if I have the time, but dont rely on it.

CynCeyd commented 7 years ago

Thanks, I will have a look on that later. I'm currently developing an updated and OOPed version of the PHP-side of the script. When I have the time, I'm going to add this feature.

CynCeyd commented 5 years ago

Automatic linking will now be provided in the Version 2 Beta.