Different server connections can be set, which can then be accessed by other plugins.
Supports RAW, SSH, HTTP and HTTP Queries
Informations for WoltLab Cloud Customers
Questions and answers
How do I create a new connection?
Go to ACP -> configuration -> TeamSpeak -> Server -> add TeamSpeak server.
How can I implement the API in my plugin?
Add the dependency to this plugin to your package.xml:
<requiredpackage minversion="3.0.1">eu.hanashi.wsc.teamspeak-api</requiredpackage>
Let your users select the server connection in the ACP using the option.xml:
<option name="my_plugin_teamspeak_identity">
<categoryname>my_category</categoryname>
<optiontype>TeamSpeakConnectionSelect</optiontype>
</option>
The name (in the example my_plugin_teamspeak_identity) and the correct category (in the example my_category) have to be chosen by yourself.
Now create a PHP class in the directory lib/system/teamspeak which extends the class AbstractTeamSpeakHandler:
<?php
namespace wcf\system\teamspeak;
class MyPluginTeamSpeakHandler extends AbstractTeamSpeakHandler {
protected $teamspeakID = MY_PLUGIN_TEAMSPEAK_IDENTITIY;
}
Of course you can choose the file and class name yourself. Don't forget to use the correct constant instead of MY_PLUGIN_TEAMSPEAK_IDENTITIY.
Now you can access the TeamSpeak API in other classes. Here is an example in an action class::
<?php
namespace wcf\action;
use wcf\system\teamspeak\MyPluginTeamSpeakHandler;
class MyAction extends AbstractAction {
public function execute() {
parent::execute();
// TeamSpeak command: serverlist
$serverlist = MyPluginTeamSpeakHandler::getInstance()->serverlist();
// TeamSpeak command: clientlist -uid -country
$clientlist = MyPluginTeamSpeakHandler::getInstance()->clientlist(['-uid', '-country']);
// TeamSpeak command: sendtextmessage targetmode=1 target=1 msg=Hello\sWorld!
MyPluginTeamSpeakHandler::getInstance()->sendtextmessage(['targetmode' => 1, 'target' => 1, 'msg' => 'Hello World!']);
}
}
Display More
How do I execute a TeamSpeak command?
The TeamSpeak command is always the same as the method. The parameters are passed to the parameters as an array. Here are some examples:
<?php
use wcf\system\teamspeak\MyPluginTeamSpeakHandler;
// TemSpeak command: serverlist
MyPluginTeamSpeakHandler::getInstance()->serverlist();
// TemSpeak command: clientlist -uid -away -groups
MyPluginTeamSpeakHandler::getInstance()->clientlist(['-uid', '-away', '-groups']);
// TemSpeak command: clientdbfind pattern=Hanashi
MyPluginTeamSpeakHandler::getInstance()->clientdbfind(['pattern' => 'Hanashi']);
// TemSpeak command: clientdbfind pattern=FPMPSC6MXqXq751dX7BKV0JniSo= -uid
MyPluginTeamSpeakHandler::getInstance()->clientdbfind(['pattern' => 'FPMPSC6MXqXq751dX7BKV0JniSo=', '-uid']);
// TemSpeak command: sendtextmessage targetmode=2 target=12 msg=Hello\sWorld!
MyPluginTeamSpeakHandler::getInstance()->sendtextmessage(['targetmode' => 2, 'target' => 12, 'msg' => 'Hello World!']);
Display More
-
Version 3.0.2
- Hanashi
- 2.42 MB
- 5 Downloads
bug fixes
- resolves the security issue CVE-2023-27560 in phpseclib
-
Version 3.0.1
- Hanashi
- 385.28 kB
- 8 Downloads
Improvements
- Codestyle adjustments
- Primary key added to install script
- TypeScript formatting (see repository)
- phpseclib updated
- XML style unified
- Template formatting unified
bugfix
- in the ACP menu was a wrong page linked to create a TeamSpeak server
-
Version 3.0.0
- Hanashi
- 370.59 kB
- 97 Downloads
Attention: At least WoltLab Suite 5.3 is now required.
- CHANGE: switch to Database PHP API
- CHANGE: switch to FormBuilder
- CHANGE: unused uses removed
- CHANGE: switch to GuzzleHttp for HTTP/HTTPS Query
- CHANGE: conversion of the JavaScript code to TypeScript
- CHANGE: phpseclib2 updated to phpseclib3
- FEATURE: query password is no longer output when editing the server in ACP
- FEATURE: better selection of TeamSpeak servers
- FEATURE: better error output if server cannot be created
-
Version 2.1.1
- Hanashi
- 252.03 kB
- 5 Downloads
- CHANGE: switch to PSR-12
-
Version 2.1.0
- Hanashi
- 252.36 kB
- 131 Downloads
- FIX: Parameters for HTTP/HTTPS query were passed incorrectly
- FIX: Infinite Loop
- FEATURE: Requirements for multiple server select built in
-
Version 2.0.0
- Hanashi
- 251.32 kB
- 13 Downloads
- FEATURE: the use of HTTP and HTTPS server queries is now possible
- CHANGE: Raw returns on execute were removed
- CHANGE: Code optimizations
-
Version 1.5.7
- Hanashi
- 1.38 MB
- 72 Downloads
FIX: Deprecated PHP 7.4 function
-
Version 1.5.6
- Hanashi
- 249.68 kB
- 27 Downloads
Verbesserte Ausgabe bei Fehlern zum Besseren Debugging.
Mit SSH wurde fälschlicherweise eine ErrorException anstatt einer TeamSpeakException ausgegeben.
-
Version 1.5.4
- Hanashi
- 251.24 kB
- 211 Downloads
- CHANGE; Umstellung auf MEDIUMINT damit höhere Ports verwendet werden können
-
Version 1.5.3
- Hanashi
- 249.74 kB
- 25 Downloads
- FIX: Behebt Fehlermeldung wenn keine Verbindung zum TS-Server aufgebaut werden konnte
Ivan.K
In der Übersicht steht "Support gibt es in mein Supportforum" Der link dazu ist Broken.
Könnte der Entwickler dies bitte beheben Danke
Hanashi Author
Hallo,
vielen Dank für die Info. Notfalls steht die Webseite auch rechts in der Sidebar: https://hanashi.dev
Die Links werde ich zeitnah korrigieren.
Ivan.K
Danke dir
Ivan.K
Trotzdem mal ne Frage.
Ich muss TS API ganz normal installieren und das das TeamSpeak Sync dan dann Funktioniert das Ja.
Ich habe die Aktuelle Version und PHP 7.2
Weil ich habe die andere Version von Teamspeak Sync aber der Support ist für Arsch.
Ich frage voher will nicht wieder Geld in den sand setzten weil ich gerne so was haben möchte
Hanashi Author
Hallo,
TeamSpeak-Sync liefert die API direkt mit. Du kannst sie also vorher manuell installieren oder mit TeamSpeak-Sync automatisch mit installieren. Natürlich muss das Plugin danach noch entsprechend konfiguriert werden. Mehr dazu findest bei mir im FAQ unter TeamSpeak (das FAQ ist auch ohne Registrierung aufrufbar).
TeamSpeak-Sync läuft auf WoltLab Suite 5.3 und höher. Als PHP Version würde ich mindestens PHP 7.4 empfehlen (noch besser PHP 8.0 oder höher). PHP 7.2 erhält aktuell keine Sicherheitsupdates mehr, mehr dazu findest du hier: https://www.php.net/supported-versions.php
Ich persönlich unterstütze nur noch PHP 7.4+ und ab November nur noch PHP 8.0+
Ivan.K
Aha Never Mind hab die Version PHP Version 7.4.28
SeraphLP
Sehr geiles Plugin
Ich habe nur ein einziges Problem:
Die User werden zwar synchronisiert, jedoch wenn sie auf dem Teamspeak reconnecten dann sind die nicht mehr synchronisiert.
Hanashi Author
Hallo, die API synchronisiert nichts. Sie ist lediglich eine Schnittstelle für Entwickler.
Eisengrind
Kleine Idee für Entwickler:
Ein TS Bot der, wenn etwas in eine bestimmtes Forum gepostet wurde, daraufhin Member eine bestimmte TS Gruppe via Chat anschreibt, mit folgendem Inhalt:
Titel,
Anfangsteil des Inhalts und
Link zum Posting.
Quasi ein Notify Funktion für TS3.
Hanashi Author
Sowas ähnliches ist geplant, insofern TS5 global Chats bekommt. Dann wollte ich das wie beim Discord-Sync machen, dass neue Forenbeiträge in einen globalen Chat gepostet werden. Aber erstmal abwarten