Jump to content

Send All Teamspeak Servers Message Script


Recommended Posts

Im currently trying to work on a script (I hope), that will do what the "Global Message" does under a virtual server from the control panel. Only I want to do it so I can send a message to ALL virtual servers on a single server (ie, When im about to do work on that box, and going to reboot it/etc). Would I be using the TeamSpeakServer.VirtualServer.SendMessage method to do this?




If it is, I guess I just get to figure out how to enumerate each server from code then.





Link to comment
Share on other sites

It's easier to just use Util.TeamSpeakServer directly because Objects.VirtualVoiceServer is mostly just database stuff. Try this:






<div class="pre"><pre><tcascript>

<language name="VB" />

<waitForUserAction value="true"/>




Imports System


Public Class BroadcastTS

Public Shared Sub Main()

'Your global message:

Dim msg As String = "Your global message"


'Get a list of configured master teamspeak servers:

Dim teamspeakservers() As TCAdminSDK.Objects.VoiceServer = TCAdminSDK.Objects.VoiceServer.GetVoiceServers

If Not teamspeakservers Is Nothing Then

For Each teamspeakserver As TCAdminSDK.Objects.VoiceServer In teamspeakservers

If teamspeakserver.Enabled Then 'if you want to send the message to just one teamspeak master server add: And teamspeakserver.VoiceServerID = "TCXXXXXXXXXX"


'Connect to the teamspeak server with the saved admin and password using telnet

Dim ts As New TCAdminSDK.Util.TeamSpeakServer

ts.SuperLogin(teamspeakserver.ServerIP, teamspeakserver.AdminPort, teamspeakserver.Admin, TCAdminBase.Encryption.DecryptString128Bit(teamspeakserver.Password))


'Get a list of virtual servers on that server

Dim virtualservers() As TCAdminSDK.Util.TeamSpeakServer.VirtualServer = ts.VirtualServers

If Not virtualservers Is Nothing Then

'Send the message to each virtual server

For Each virtualserver As TCAdminSDK.Util.TeamSpeakServer.VirtualServer In virtualservers



End If

'Logout from teamspeak server


End If


End If

End Sub

End Class





Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 16 Guests (See full list)

    • There are no registered users currently online
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use