public function __construct() { $tssettings = TeamspeakSetting::first(); $this->ts3 = TeamSpeak3::factory("serverquery://" . $tssettings->tsuser . ":" . $tssettings->tspass . "@" . $tssettings->tshost . ":" . $tssettings->tsport . "/?server_port=" . $tssettings->tscport); }
public function applyAllChannelGroups() { $tsserver = new \Seat\Ts3\Helpers\TeamSpeak3Adapater(); $tssettings = TeamspeakSetting::first(); $usergroup = $tssettings->defaultgroup; $clients = $tsserver->serverGroupClientList($usergroup); foreach ($clients as $client) { $corpTicker = substr($client["client_nickname"], 0, strpos($client["client_nickname"], " |")); if ($corpTicker == $tssettings->noodlTicker) { //"N0ODL") { $client->setChannelGroup($tssettings->noodlCID, $tssettings->noodlCGID); } else { $client->setChannelGroup($tssettings->s4uceCID, $tssettings->s4uceCGID); } } }