Skip to content

Releases: samuelgrant/Teamspeak-GO

Fixed ServerGlobalMessage

30 Jun 21:00

Choose a tag to compare

v1.0.2

Fixed a variable issue

Allows use of HTTPS & Improves `status.IsSuccess()`

26 Jun 23:57
270ca4b

Choose a tag to compare

Required Change

  • When calling ConfigureHttp a third paramater 'useHttps` must be added.

HTTP - Web Query

22 Jun 21:36
bf77eb2

Choose a tag to compare

Http Web Query

On February 20, Team Speak developer TS.ChrisR announced that server version 3.12.0 [Beta] would introduce a new Query interface called 'Web Query'. The command structure of the Web Query is like the original query system. Switching to the HTTP system yields several advantages:

  • HTTP can be secured using SSL/HTTPs

  • HTTP queries are faster as each request sends an authorization header.
    Previously a minimum of two calls would need to be made, the first would establish a connection, and the second would authenticate the query client with the server.

    Because we no longer need to make two calls prior to executing the desired query, it will be possible to fire HTTP calls as necessary without creating a pool of available clients..... this means that HTTP is more efficient and resource friendly

  • HTTP queries return json data, this means we can convert it into structs using less code

Breaking Changes

A summary of changes are listed below, for a quick usage guide view the readme

More information can be found in the wiki.

Global

  • Changed the following return types on all calls:
    • *QueryResponse to *status
      • Status is the name of the object in the JSON response
      • Changed QueryResponse.IsSuccess to status.IsSuccess()
      • Status structs with a code of -1 have been altered by the function and do not reflect the TS Response
  • Detached functions from *net.conn they are now found at funcName()

Tokens/Privilege Keys

  • Fixed the spelling of Tokenslist() to TokensList()

Virtual Servers

  • Replaced Use() with SelectVirtualServer(sid)
    • The selected can be changed at any time by using SelectVirtualServer(sid)
    • If a virtual server has not been specified 1 will be used by default
  • List() has been renamed ServersList()

Server/Channel Groups

  • Removed unused properties from ServerGroup and ChannelGroup struts
  • ServerGroupAddClient has been renamed ServerGroupsAddClient
  • ServerGroupRemoveClient has been renamed ServerGroupsRevokeClient

ts3.go / Telnet Wrapper

  • Removed ts3.go and included functions: - this was the Telnet wrapper

    • Connect
    • IsConnected
    • Disconnect
    • Exec
  • Added ts3Http.go, the HTTP wrapper.

    • get('path', isGlobal, queries) is the new Exec function
      • isGlobal (bool) - If TRUE the command does not get sent to a specific virtual server
      • queries is an array of KeyValue{} that will be turned into a query string

Utils

  • Encoder/Decoder only convert spaces to + and vice versa
  • Added a WebEncoder - Only to be used if you build your own query strings, the get() function will do this automatically
    • Converts (white space) to %20
    • Converts = to %3D
  • Deleted QueryResponse
  • Added function i64tostr - Converts an int64 to a string

Removed Parse functions

The following parse functions have been removed as json.Unmarshal is being used:

  • ParseVirtualServer
  • parsePrivilegeKey

+ Server group management functions

19 Jun 00:17

Choose a tag to compare

v0.3.3-alpha

18 Jun 07:04

Choose a tag to compare

v0.3.3-alpha Pre-release
Pre-release
Fixed go.mod

Small fixes

18 Jun 06:54

Choose a tag to compare

Small fixes Pre-release
Pre-release
  • Fixed the package name in go.mod
  • Removed .vscode I will add an example debugging configuration on the wiki shortly.
  • Minor tweaks to variable names

Added functions to kick and delete users

17 Jun 02:21

Choose a tag to compare

Notice: The following functions in user.go have been renamed so their names are in line with the rest of the lib.

  • FindUserByCustomSearch(ident string, value string) => UserFindByCustomSearch(ident string, value string)
  • FindUserByDbId(cldbid int64) => UserFindByDbId(cldbid int64)
  • PokeUser(clid int, msg string) => UserPoke(clid int, msg string)

New Functions:

  • UserDelete(clid) deletes a user from the server's database. This can be used if you need to delete a user’s custom fields or you wish to revoke all permissions. A user cannot be deleted while connected to the server so this function will first call UserKickClients (see below)

  • UserKickClients(clid, msg) kicks all clients belonging to a specific user

Added channel group commands

16 Jun 09:50

Choose a tag to compare

Pre-release

Added channel group commands that:

  • List all channel groups
  • List channel group members for a specific channel
  • Set a member’s channel group for a given channel
  • Reset a member’s channel group for a given channel
  • Poke all members of a channel group

Converted code to a library & Improved command feedback

16 Jun 06:43

Choose a tag to compare

This release may break your code. If you were using an earlier version check your return types.

The wiki has not been updated to reflect the changes in this release

This release aims to achieve three goals:

  • Convert the code from a stand-alone go project to a library.

    • Removed main.go and func main()
    • Renamed the package of all files from main to ts3
  • Improve logging

    • Standardise the log format and colour
    • Disable logging by default
    • Provide a function to enable/disable logging LoggingEnabled(true)
    • Ensure that we log when an error occurs with a basic message to indicate the cause of the issue
  • Standardise the response from functions within the lib

    • The Exec() function now returns three params *QueryResponse, body, error
    • Most functions will now check for errors and query failures after executing a statment for example
res, body, error := client.Exec("serverlist")
if err != nil || !res.IsSucess { 
   // runtime error or query error occured
  // log the issue
 // return res, err
}
  • Made sure that the query response is returned to the function calling it where possible
  • Used pointers for return types so that nil can be returned

initial release

15 Jun 02:22

Choose a tag to compare

initial release Pre-release
Pre-release

This code comes with a basic client and the following functions
General

  • Connect
  • Disconnect
  • Login
  • Use
  • IsConnected
  • Exec (Sends commands to the server)

Privilege Keys

  • Add
  • Remove
  • List

Server Commands

  • GlobalMessage
  • List
  • Start
  • Stop

ServerGroupss

  • ServerGroups (List all server groups)
  • ServerGroupsAddClient
  • ServerGroupsRemoveClient
  • ServerGroupMembers
  • ServerGroupPoke

User

  • ActiveClients (Lists clients who are connected to the server)
  • FindUserByDbId
  • FindUserByCustomSearch