コード例 #1
0
 public function __construct()
 {
     $tssettings = TeamspeakSetting::first();
     $this->ts3 = TeamSpeak3::factory("serverquery://" . $tssettings->tsuser . ":" . $tssettings->tspass . "@" . $tssettings->tshost . ":" . $tssettings->tsport . "/?server_port=" . $tssettings->tscport);
 }
コード例 #2
0
ファイル: Ts3Controller.php プロジェクト: hderp886/ts-mod
 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);
         }
     }
 }