-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
30 lines (23 loc) · 1.25 KB
/
init.lua
File metadata and controls
30 lines (23 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require("ts3init") -- Required for ts3RegisterModule
require("ts3poke/events") -- Forwarded TeamSpeak 3 callbacks
local MODULE_NAME = "ts3poke"
-- Initialize Menu's
local function createMenus(moduleMenuItemID)
-- Store value added to menuIDs to be able to calculate menuIDs for this module again for setPluginMenuEnabled (see demo.lua)
poke_events.moduleMenuItemID = moduleMenuItemID
-- Create Menu ID's
return {
{ts3defs.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, poke_events.MenuIDs.MENU_ID_CLIENT_1, "Poke Client x10 (fast)", "../test_plugin/1.png"},
{ts3defs.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, poke_events.MenuIDs.MENU_ID_CLIENT_2, "Poke Client x100 (fast)", "../test_plugin/2.png"},
{ts3defs.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, poke_events.MenuIDs.MENU_ID_CLIENT_3, "Poke Client x10 (slow)", "../test_plugin/1.png"},
{ts3defs.PluginMenuType.PLUGIN_MENU_TYPE_CLIENT, poke_events.MenuIDs.MENU_ID_CLIENT_4, "Poke Client x100 (slow)", "../test_plugin/2.png"},
}
end
-- Define Callbacks
local registeredEvents = {
createMenus = createMenus,
onConnectStatusChangeEvent = poke_events.onConnectStatusChangeEvent,
onMenuItemEvent = poke_events.onMenuItemEvent
}
-- Register Callbacks
ts3RegisterModule(MODULE_NAME, registeredEvents)