Hey,
I'd like a plugin that can accept commands via text chat or poke.
The commands should be:
.joinme - joins channel user is in.
.home - goes to defined home channel
Cheers!
We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020
Hey,
I'd like a plugin that can accept commands via text chat or poke.
The commands should be:
.joinme - joins channel user is in.
.home - goes to defined home channel
Cheers!
Easily done with a LUA Script.
When sending PMs please make sure to include a reference link to the thread in question in the body of your message.
Any chance anyone could do this for me?
Ok i'm not familiar with LUA myself, so dont take this as a masterpiece
download the attachment, extract it to
TS3Folder/plugins/lua_plugin
so you have
TS3Folder/plugins/lua_plugin/autojoin/init.lua
in the end.
you can edit the file...right at the start the "home channel" is defined, so you can edit it easily
enable the lua plugin and in the preferences of the plugin you have to enable the "autojoin" script. good luck
here the code, if someone else is interested
Code:require("ts3init") -- Required for ts3RegisterModulerequire("ts3defs") local MODULE_NAME = "autojoin" local home_channel = "Eingangshalle" local function localOnTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored) if targetMode == ts3defs.TextMessageTargetMode.TextMessageTarget_CLIENT then clientID = ts3.getClientID(serverConnectionHandlerID) if message == ".joinme" then newChannelID = ts3.getChannelOfClient(serverConnectionHandlerID, fromID) ts3.requestClientMove(serverConnectionHandlerID, clientID, newChannelID, "") elseif message == ".home" then channelList, err = ts3.getChannelList(serverConnectionHandlerID) for i, channelID in ipairs(channelList) do if home_channel == ts3.getChannelVariableAsString(serverConnectionHandlerID, channelID, ts3defs.ChannelProperties.CHANNEL_NAME) then homeChannelID = channelID break end end ts3.requestClientMove(serverConnectionHandlerID, clientID, homeChannelID, "") end end return 0 end -- Define which callbacks you want to receive in your module. Callbacks not mentioned -- here will not be called. To avoid function name collisions, your callbacks should -- be put into an own package. local registeredEvents = { onTextMessageEvent = localOnTextMessageEvent } -- Register your callback functions with a unique module name. ts3RegisterModule(MODULE_NAME, registeredEvents)
There are currently 1 users browsing this thread. (0 members and 1 guests)