WoltLab Cloud TeamSpeak API 3.0.2

This plugin serves as an interface between other plugins and your TeamSpeak server. This plugin is especially relevant for developers. It can also be used as a base plugin for other plugins.

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

Attention: Only HTTP and HTTPS server queries work in the WoltLab cloud. RAW and SSH queries are not working in the WoltLab cloud.

This means that the TeamSpeak server must have HTTP or HTTPS queries enabled to use the plugin in the WoltLab cloud.

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:

XML: 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:

XML: 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: MyPluginTeamSpeakHandler.class.php
<?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::

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:

Images

  • Version 3.0.2

    bug fixes

    • resolves the security issue CVE-2023-27560 in phpseclib
  • Version 3.0.1

    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

    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

    • CHANGE: switch to PSR-12
  • Version 2.1.0

    • FIX: Parameters for HTTP/HTTPS query were passed incorrectly
    • FIX: Infinite Loop
    • FEATURE: Requirements for multiple server select built in
  • Version 2.0.0

    • 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

    FIX: Deprecated PHP 7.4 function

  • Version 1.5.6

    Verbesserte Ausgabe bei Fehlern zum Besseren Debugging.

    Mit SSH wurde fälschlicherweise eine ErrorException anstatt einer TeamSpeakException ausgegeben.

  • Version 1.5.4

    • CHANGE; Umstellung auf MEDIUMINT damit höhere Ports verwendet werden können
  • Version 1.5.3

    • FIX: Behebt Fehlermeldung wenn keine Verbindung zum TS-Server aufgebaut werden konnte
  • In der Übersicht steht "Support gibt es in mein Supportforum" Der link dazu ist Broken.

    Könnte der Entwickler dies bitte beheben Danke

    • 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.

    • Danke dir

    • 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

    • Hallo,

      Quote

      Ich muss TS API ganz normal installieren und das das TeamSpeak Sync dan dann Funktioniert das Ja.

      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).

      Quote

      Ich habe die Aktuelle Version und PHP 7.2

      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+

    • Aha Never Mind hab die Version PHP Version 7.4.28

  • 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.

    • Hallo, die API synchronisiert nichts. Sie ist lediglich eine Schnittstelle für Entwickler.

  • 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.

    • 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 :)

      Like 1