B1uscr34m

Teamspeak 3 LUA Events

Aug 10th, 2015
248
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onConnectStatusChangeEvent(serverConnectionHandlerID, status, errorNumber)
  2.     debugPrint("Lua: onConnectStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. errorNumber)
  3.     for script,events in pairs(ts3RegisteredModules) do
  4.         if events.onConnectStatusChangeEvent ~= nil then
  5.             events.onConnectStatusChangeEvent(serverConnectionHandlerID, status, errorNumber)
  6.         end
  7.     end
  8. end
  9.  
  10. function onNewChannelEvent(serverConnectionHandlerID, channelID, channelParentID)
  11.     debugPrint("Lua: onNewChannelEvent: " .. serverConnectionHandlerID .. " " .. channelID .. " " .. channelParentID)
  12.     for script,events in pairs(ts3RegisteredModules) do
  13.         if events.onNewChannelEvent ~= nil then
  14.             events.onNewChannelEvent(serverConnectionHandlerID, channelID, channelParentID)
  15.         end
  16.     end
  17. end
  18.  
  19. function onNewChannelCreatedEvent(serverConnectionHandlerID, channelID, channelParentID, invokerID, invokerName, invokerUniqueIdentifier)
  20.     debugPrint("Lua: onNewChannelCreatedEvent: " .. serverConnectionHandlerID .. " " .. channelID .. " " .. channelParentID .. " " .. invokerID .. " " .. invokerName .. " " .. invokerUniqueIdentifier)
  21.     for script,events in pairs(ts3RegisteredModules) do
  22.         if events.onNewChannelCreatedEvent ~= nil then
  23.             events.onNewChannelCreatedEvent(serverConnectionHandlerID, channelID, channelParentID, invokerID, invokerName, invokerUniqueIdentifier)
  24.         end
  25.     end
  26. end
  27.  
  28. function onDelChannelEvent(serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)
  29.     debugPrint("Lua: onDelChannelEvent: " .. serverConnectionHandlerID .. " " .. channelID .. " " .. invokerID .. " " .. invokerName .. " " .. invokerUniqueIdentifier)
  30.     for script,events in pairs(ts3RegisteredModules) do
  31.         if events.onDelChannelEvent ~= nil then
  32.             events.onDelChannelEvent(serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)
  33.         end
  34.     end
  35. end
  36.  
  37. function onChannelMoveEvent(serverConnectionHandlerID, channelID, newParentChannelID, invokerID, invokerName, invokerUniqueIdentifier)
  38.     debugPrint("Lua: onChannelMoveEvent: " .. serverConnectionHandlerID .. " " .. channelID .. " " .. newParentChannelID .. " " .. invokerID .. " " .. invokerName .. " " .. invokerUniqueIdentifier)
  39.     for script,events in pairs(ts3RegisteredModules) do
  40.         if events.onChannelMoveEvent ~= nil then
  41.             events.onChannelMoveEvent(serverConnectionHandlerID, channelID, newParentChannelID, invokerID, invokerName, invokerUniqueIdentifier)
  42.         end
  43.     end
  44. end
  45.  
  46. function onUpdateChannelEvent(serverConnectionHandlerID, channelID)
  47.     debugPrint("Lua: onUpdateChannelEvent: " .. serverConnectionHandlerID .. " " .. channelID)
  48.     for script,events in pairs(ts3RegisteredModules) do
  49.         if events.onUpdateChannelEvent ~= nil then
  50.             events.onUpdateChannelEvent(serverConnectionHandlerID, channelID)
  51.         end
  52.     end
  53. end
  54.  
  55. function onUpdateChannelEditedEvent(serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)
  56.     debugPrint("Lua: onUpdateChannelEditedEvent: " .. serverConnectionHandlerID .. " " ..  channelID .. " " .. invokerID .. " " .. invokerName .. " " .. invokerUniqueIdentifier)
  57.     for script,events in pairs(ts3RegisteredModules) do
  58.         if events.onUpdateChannelEditedEvent ~= nil then
  59.             events.onUpdateChannelEditedEvent(serverConnectionHandlerID, channelID, invokerID, invokerName, invokerUniqueIdentifier)
  60.         end
  61.     end
  62. end
  63.  
  64. function onUpdateClientEvent(serverConnectionHandlerID, clientID, invokerID, invokerName, invokerUniqueIdentifier)
  65.     debugPrint("Lua: onUpdateClientEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. invokerID .. " " .. invokerName .. " " .. invokerUniqueIdentifier)
  66.     for script,events in pairs(ts3RegisteredModules) do
  67.         if events.onUpdateClientEvent ~= nil then
  68.             events.onUpdateClientEvent(serverConnectionHandlerID, clientID, invokerID, invokerName, invokerUniqueIdentifier)
  69.         end
  70.     end
  71. end
  72.  
  73. function onClientMoveEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage)
  74.     debugPrint("Lua: onClientMoveEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility .. " " .. moveMessage)
  75.     for script,events in pairs(ts3RegisteredModules) do
  76.         if events.onClientMoveEvent ~= nil then
  77.             events.onClientMoveEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moveMessage)
  78.         end
  79.     end
  80. end
  81.  
  82. function onClientMoveSubscriptionEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility)
  83.     debugPrint("Lua: onClientMoveSubscriptionEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility)
  84.     for script,events in pairs(ts3RegisteredModules) do
  85.         if events.onClientMoveSubscriptionEvent ~= nil then
  86.             events.onClientMoveSubscriptionEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility)
  87.         end
  88.     end
  89. end
  90.  
  91. function onClientMoveTimeoutEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, timeoutMessage)
  92.     debugPrint("Lua: onClientMoveTimeoutEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility .. " " .. timeoutMessage)
  93.     for script,events in pairs(ts3RegisteredModules) do
  94.         if events.onClientMoveTimeoutEvent ~= nil then
  95.             events.onClientMoveTimeoutEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, timeoutMessage)
  96.         end
  97.     end
  98. end
  99.  
  100. function onClientMoveMovedEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moverID, moverName, moverUniqueIdentifier, moveMessage)
  101.     debugPrint("Lua: onClientMoveMovedEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility .. " " .. moverID .. " " .. moverName .. " " .. moverUniqueIdentifier .. " " .. moveMessage)
  102.     for script,events in pairs(ts3RegisteredModules) do
  103.         if events.onClientMoveMovedEvent ~= nil then
  104.             events.onClientMoveMovedEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, moverID, moverName, moverUniqueIdentifier, moveMessage)
  105.         end
  106.     end
  107. end
  108.  
  109. function onClientKickFromChannelEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)
  110.     debugPrint("Lua: onClientKickFromChannelEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility .. " " .. kickerID .. " " .. kickerName .. " " .. kickerUniqueIdentifier .. " " .. kickMessage)
  111.     for script,events in pairs(ts3RegisteredModules) do
  112.         if events.onClientKickFromChannelEvent ~= nil then
  113.             events.onClientKickFromChannelEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)
  114.         end
  115.     end
  116. end
  117.  
  118. function onClientKickFromServerEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)
  119.     debugPrint("Lua: onClientKickFromServerEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility .. " " .. kickerID .. " " .. kickerName .. " " .. kickerUniqueIdentifier .. " " .. kickMessage)
  120.     for script,events in pairs(ts3RegisteredModules) do
  121.         if events.onClientKickFromServerEvent ~= nil then
  122.             events.onClientKickFromServerEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickMessage)
  123.         end
  124.     end
  125. end
  126.  
  127. function onServerEditedEvent(serverConnectionHandlerID, editerID, editerName, editerUniqueIdentifier)
  128.     debugPrint("Lua: onServerEditedEvent: " .. serverConnectionHandlerID .. " " .. editerID .. " " .. editerName .. " " .. editerUniqueIdentifier)
  129.     for script,events in pairs(ts3RegisteredModules) do
  130.         if events.onServerEditedEvent ~= nil then
  131.             events.onServerEditedEvent(serverConnectionHandlerID, editerID, editerName, editerUniqueIdentifier)
  132.         end
  133.     end
  134. end
  135.  
  136. function onServerUpdatedEvent(serverConnectionHandlerID)
  137.     debugPrint("Lua: onServerUpdatedEvent: " .. serverConnectionHandlerID)
  138.     for script,events in pairs(ts3RegisteredModules) do
  139.         if events.onServerUpdatedEvent ~= nil then
  140.             events.onServerUpdatedEvent(serverConnectionHandlerID)
  141.         end
  142.     end
  143. end
  144.  
  145. function onServerErrorEvent(serverConnectionHandlerID, errorMessage, errorCode, extraMessage)
  146.     debugPrint("Lua: onServerErrorEvent: " .. serverConnectionHandlerID .. " " .. errorMessage .. " " .. errorCode)
  147.     for script,events in pairs(ts3RegisteredModules) do
  148.         if events.onServerErrorEvent ~= nil then
  149.             events.onServerErrorEvent(serverConnectionHandlerID, errorMessage, errorCode, extraMessage)
  150.         end
  151.     end
  152. end
  153.  
  154. function onServerStopEvent(serverConnectionHandlerID, shutdownMessage)
  155.     debugPrint("Lua: onServerStopEvent: serverConnectionHandlerID = " .. serverConnectionHandlerID .. ", shutdownMessage = " .. shutdownMessage)
  156.     for script,events in pairs(ts3RegisteredModules) do
  157.         if events.onServerStopEvent ~= nil then
  158.             events.onServerStopEvent(serverConnectionHandlerID, shutdownMessage)
  159.         end
  160.     end
  161. end
  162.  
  163. function onTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
  164.     debugPrint("Lua: onTextMessageEvent: " .. serverConnectionHandlerID .. " " .. targetMode .. " " .. toID .. " " .. fromID .. " " .. fromName .. " " .. fromUniqueIdentifier .. " " .. message .. " " .. ffIgnored)
  165.     local retVal = 0
  166.     for script,events in pairs(ts3RegisteredModules) do
  167.         if events.onTextMessageEvent ~= nil then
  168.             local result = events.onTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
  169.             if result > 0 then
  170.                 retVal = 1  -- If at least one Lua module returns 1, this function will also return 1 and let the client ignore the text message
  171.             end
  172.         end
  173.     end
  174.     return retVal  -- Return 0: Client will handle the text message as usual. Return 1: Client will ignore the test message.
  175. end
  176.  
  177. function onTalkStatusChangeEvent(serverConnectionHandlerID, status, isReceivedWhisper, clientID)
  178.     debugPrint("Lua: onTalkStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. isReceivedWhisper .. " " .. clientID)
  179.     for script,events in pairs(ts3RegisteredModules) do
  180.         if events.onTalkStatusChangeEvent ~= nil then
  181.             events.onTalkStatusChangeEvent(serverConnectionHandlerID, status, isReceivedWhisper, clientID)
  182.         end
  183.     end
  184. end
  185.  
  186. function onConnectionInfoEvent(serverConnectionHandlerID, clientID)
  187.     debugPrint("Lua: onConnectionInfoEvent: " .. serverConnectionHandlerID .. " " .. clientID)
  188.     for script,events in pairs(ts3RegisteredModules) do
  189.         if events.onConnectionInfoEvent ~= nil then
  190.             events.onConnectionInfoEvent(serverConnectionHandlerID, clientID)
  191.         end
  192.     end
  193. end
  194.  
  195. function onServerConnectionInfoEvent(serverConnectionHandlerID)
  196.     debugPrint("Lua: onServerConnectionInfoEvent: " .. serverConnectionHandlerID)
  197.     for script,events in pairs(ts3RegisteredModules) do
  198.         if events.onServerConnectionInfoEvent ~= nil then
  199.             events.onServerConnectionInfoEvent(serverConnectionHandlerID)
  200.         end
  201.     end
  202. end
  203.  
  204. function onChannelSubscribeEvent(serverConnectionHandlerID, channelID)
  205.     debugPrint("Lua: onChannelSubscribeEvent: " .. serverConnectionHandlerID .. " " .. channelID)
  206.     for script,events in pairs(ts3RegisteredModules) do
  207.         if events.onChannelSubscribeEvent ~= nil then
  208.             events.onChannelSubscribeEvent(serverConnectionHandlerID, channelID)
  209.         end
  210.     end
  211. end
  212.  
  213. function onChannelSubscribeFinishedEvent(serverConnectionHandlerID)
  214.     debugPrint("Lua: onChannelSubscribeFinishedEvent: " .. serverConnectionHandlerID)
  215.     for script,events in pairs(ts3RegisteredModules) do
  216.         if events.onChannelSubscribeFinishedEvent ~= nil then
  217.             events.onChannelSubscribeFinishedEvent(serverConnectionHandlerID)
  218.         end
  219.     end
  220. end
  221.  
  222. function onChannelUnsubscribeEvent(serverConnectionHandlerID, channelID)
  223.     debugPrint("Lua: onChannelUnsubscribeEvent: " .. serverConnectionHandlerID .. " " .. channelID)
  224.     for script,events in pairs(ts3RegisteredModules) do
  225.         if events.onChannelUnsubscribeEvent ~= nil then
  226.             events.onChannelUnsubscribeEvent(serverConnectionHandlerID, channelID)
  227.         end
  228.     end
  229. end
  230.  
  231. function onChannelUnsubscribeFinishedEvent(serverConnectionHandlerID)
  232.     debugPrint("Lua: onChannelUnsubscribeFinishedEvent: " .. serverConnectionHandlerID)
  233.     for script,events in pairs(ts3RegisteredModules) do
  234.         if events.onChannelUnsubscribeFinishedEvent ~= nil then
  235.             events.onChannelUnsubscribeFinishedEvent(serverConnectionHandlerID)
  236.         end
  237.     end
  238. end
  239.  
  240. function onChannelDescriptionUpdateEvent(serverConnectionHandlerID, channelID)
  241.     debugPrint("Lua: onChannelDescriptionUpdateEvent: " .. serverConnectionHandlerID .. " " .. channelID)
  242.     for script,events in pairs(ts3RegisteredModules) do
  243.         if events.onChannelDescriptionUpdateEvent ~= nil then
  244.             events.onChannelDescriptionUpdateEvent(serverConnectionHandlerID, channelID)
  245.         end
  246.     end
  247. end
  248.  
  249. function onChannelPasswordChangedEvent(serverConnectionHandlerID, channelID)
  250.     debugPrint("Lua: onChannelPasswordChangedEvent: " .. serverConnectionHandlerID .. " " .. channelID)
  251.     for script,events in pairs(ts3RegisteredModules) do
  252.         if events.onChannelPasswordChangedEvent ~= nil then
  253.             events.onChannelPasswordChangedEvent(serverConnectionHandlerID, channelID)
  254.         end
  255.     end
  256. end
  257.  
  258. function onPlaybackShutdownCompleteEvent(serverConnectionHandlerID)
  259.     debugPrint("Lua: onPlaybackShutdownCompleteEvent: " .. serverConnectionHandlerID)
  260.     for script,events in pairs(ts3RegisteredModules) do
  261.         if events.onPlaybackShutdownCompleteEvent ~= nil then
  262.             events.onPlaybackShutdownCompleteEvent(serverConnectionHandlerID)
  263.         end
  264.     end
  265. end
  266.  
  267. function onClientBanFromServerEvent(serverConnectionHandlerID, clientID, oldChannelID, newChannelID, visibility, kickerID, kickerName, kickerUniqueIdentifier, kickTime, kickMessage)
  268.     debugPrint("Lua: onClientBanFromServerEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. oldChannelID .. " " .. newChannelID .. " " .. visibility .. " " .. kickerID .. " " .. kickerName .. " " .. kickerUniqueIdentifier .. " " .. kickTime .. " " .. kickMessage)
  269.     for script,events in pairs(ts3RegisteredModules) do
  270.         if events.XXX ~= nil then
  271.             events.XXX()
  272.         end
  273.     end
  274. end
  275.  
  276. function onClientPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message, ffIgnored)
  277.     debugPrint("Lua: onClientPokeEvent: " .. serverConnectionHandlerID .. " " .. pokerID .. " " .. pokerName .. " " .. message .. " " .. ffIgnored)
  278.     local retVal = 0
  279.     for script,events in pairs(ts3RegisteredModules) do
  280.         if events.onClientPokeEvent ~= nil then
  281.             local result = events.onClientPokeEvent(serverConnectionHandlerID, pokerID, pokerName, message, ffIgnored)
  282.             if result > 0 then
  283.                 retVal = 1  -- If at least one Lua module returns 1, this function will also return 1 and let the client ignore the poke
  284.             end
  285.         end
  286.     end
  287.     return retVal  -- Return 0: Client will handle the poke as usual. Return 1: Client will ignore the poke.
  288. end
  289.  
  290. function onClientSelfVariableUpdateEvent(serverConnectionHandlerID, flag, oldValue, newValue)
  291.     debugPrint("Lua: onClientSelfVariableUpdateEvent: " .. serverConnectionHandlerID .. " " .. flag .. " " .. oldValue .. " " .. newValue)
  292.     for script,events in pairs(ts3RegisteredModules) do
  293.         if events.onClientSelfVariableUpdateEvent ~= nil then
  294.             events.onClientSelfVariableUpdateEvent(serverConnectionHandlerID, flag, oldValue, newValue)
  295.         end
  296.     end
  297. end
  298.  
  299. function onServerGroupListEvent(serverConnectionHandlerID, serverGroupID, name, groupType, iconID, saveDB)
  300.     debugPrint("Lua: onServerGroupListEvent: " .. serverConnectionHandlerID .. " " .. serverGroupID .. " " .. name .. " " .. groupType .. " " .. iconID .. " " .. saveDB)
  301.     for script,events in pairs(ts3RegisteredModules) do
  302.         if events.onServerGroupListEvent ~= nil then
  303.             events.onServerGroupListEvent(serverConnectionHandlerID, serverGroupID, name, groupType, iconID, saveDB)
  304.         end
  305.     end
  306. end
  307.  
  308. function onServerGroupListFinishedEvent(serverConnectionHandlerID)
  309.     debugPrint("Lua: onServerGroupListFinishedEvent: " .. serverConnectionHandlerID)
  310.     for script,events in pairs(ts3RegisteredModules) do
  311.         if events.onServerGroupListFinishedEvent ~= nil then
  312.             events.onServerGroupListFinishedEvent(serverConnectionHandlerID)
  313.         end
  314.     end
  315. end
  316.  
  317. function onServerGroupByClientIDEvent(serverConnectionHandlerID, name, serverGroupList, clientDatabaseID)
  318.     debugPrint("Lua: onServerGroupByClientIDEvent: " .. serverConnectionHandlerID .. " " .. name .. " " .. serverGroupList .. " " .. clientDatabaseID)
  319.     for script,events in pairs(ts3RegisteredModules) do
  320.         if events.onServerGroupByClientIDEvent ~= nil then
  321.             events.onServerGroupByClientIDEvent(serverConnectionHandlerID, name, serverGroupList, clientDatabaseID)
  322.         end
  323.     end
  324. end
  325.  
  326. function onServerGroupPermListEvent(serverConnectionHandlerID, serverGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)
  327.     debugPrint("Lua: onServerGroupPermListEvent: " .. serverConnectionHandlerID .. " " .. serverGroupID .. " " .. permissionID .. " " .. permissionValue .. " " .. permissionNegated .. " " .. permissionSkip)
  328.     for script,events in pairs(ts3RegisteredModules) do
  329.         if events.onServerGroupPermListEvent ~= nil then
  330.             events.onServerGroupPermListEvent(serverConnectionHandlerID, serverGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)
  331.         end
  332.     end
  333. end
  334.  
  335. function onServerGroupClientListEvent(serverConnectionHandlerID, serverGroupID, clientDatabaseID, clientNameIdentifier, clientUniqueID)
  336.     debugPrint("Lua: onServerGroupClientListEvent: " .. serverConnectionHandlerID .. " " .. serverGroupID .. " " .. clientDatabaseID .. " " .. clientNameIdentifier .. " " .. clientUniqueID)
  337.     for script,events in pairs(ts3RegisteredModules) do
  338.         if events.onServerGroupClientListEvent ~= nil then
  339.             events.onServerGroupClientListEvent(serverConnectionHandlerID, serverGroupID, clientDatabaseID, clientNameIdentifier, clientUniqueID)
  340.         end
  341.     end
  342. end
  343.  
  344. function onChannelGroupListEvent(serverConnectionHandlerID, channelGroupID, name, groupType, iconID, saveDB)
  345.     debugPrint("Lua: onChannelGroupListEvent: " .. serverConnectionHandlerID .. " " .. channelGroupID .. " " .. name .. " " .. groupType .. " " .. iconID .. " " .. saveDB)
  346.     for script,events in pairs(ts3RegisteredModules) do
  347.         if events.onChannelGroupListEvent ~= nil then
  348.             events.onChannelGroupListEvent(serverConnectionHandlerID, channelGroupID, name, groupType, iconID, saveDB)
  349.         end
  350.     end
  351. end
  352.  
  353. function onChannelGroupListFinishedEvent(serverConnectionHandlerID)
  354.     debugPrint("Lua: onChannelGroupListFinishedEvent: " .. serverConnectionHandlerID)
  355.     for script,events in pairs(ts3RegisteredModules) do
  356.         if events.onChannelGroupListFinishedEvent ~= nil then
  357.             events.onChannelGroupListFinishedEvent(serverConnectionHandlerID)
  358.         end
  359.     end
  360. end
  361.  
  362. function onChannelGroupPermListEvent(serverConnectionHandlerID, channelGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)
  363.     debugPrint("Lua: onChannelGroupPermListEvent: " .. serverConnectionHandlerID .. " " .. channelGroupID .. " " .. permissionID .. " " .. permissionValue .. " " .. permissionNegated .. " " .. permissionSkip)
  364.     for script,events in pairs(ts3RegisteredModules) do
  365.         if events.onChannelGroupPermListEvent ~= nil then
  366.             events.onChannelGroupPermListEvent(serverConnectionHandlerID, channelGroupID, permissionID, permissionValue, permissionNegated, permissionSkip)
  367.         end
  368.     end
  369. end
  370.  
  371. function onChannelPermListEvent(serverConnectionHandlerID, channelID, permissionID, permissionValue, permissionNegated, permissionSkip)
  372.     debugPrint("Lua: onChannelPermListEvent: " .. serverConnectionHandlerID .. " " .. channelID .. " " .. permissionID .. " " .. permissionValue .. " " .. permissionNegated .. " " .. permissionSkip)
  373.     for script,events in pairs(ts3RegisteredModules) do
  374.         if events.onChannelPermListEvent ~= nil then
  375.             events.onChannelPermListEvent(serverConnectionHandlerID, channelID, permissionID, permissionValue, permissionNegated, permissionSkip)
  376.         end
  377.     end
  378. end
  379.  
  380. function onClientChannelGroupChangedEvent(serverConnectionHandlerID, channelGroupID, channelID, clientID, invokerClientID, invokerName, invokerUniqueIdentity)
  381.     debugPrint("Lua: onClientChannelGroupChangedEvent: " .. serverConnectionHandlerID .. " " .. channelGroupID .. " " .. channelID .. " " .. clientID .. " " .. invokerClientID .. " " .. invokerName .. " " .. invokerUniqueIdentity)
  382.     for script,events in pairs(ts3RegisteredModules) do
  383.         if events.onClientChannelGroupChangedEvent ~= nil then
  384.             events.onClientChannelGroupChangedEvent(serverConnectionHandlerID, channelGroupID, channelID, clientID, invokerClientID, invokerName, invokerUniqueIdentity)
  385.         end
  386.     end
  387. end
  388.  
  389. function onServerPermissionErrorEvent(serverConnectionHandlerID, errorMessage, errorCode, failedPermissionID)
  390.     debugPrint("Lua: onServerPermissionErrorEvent: " .. serverConnectionHandlerID .. " " .. errorMessage .. " " .. errorCode .. " " .. failedPermissionID)
  391.     for script,events in pairs(ts3RegisteredModules) do
  392.         if events.onServerPermissionErrorEvent ~= nil then
  393.             events.onServerPermissionErrorEvent(serverConnectionHandlerID, errorMessage, errorCode, failedPermissionID)
  394.         end
  395.     end
  396. end
  397.  
  398. function onPermissionListGroupEndIDEvent(serverConnectionHandlerID, groupEndID)
  399.     debugPrint("Lua: onPermissionListGroupEndIDEvent: " .. serverConnectionHandlerID .. " " .. groupEndID)
  400.     for script,events in pairs(ts3RegisteredModules) do
  401.         if events.onPermissionListGroupEndIDEvent ~= nil then
  402.             events.onPermissionListGroupEndIDEvent(serverConnectionHandlerID, groupEndID)
  403.         end
  404.     end
  405. end
  406.  
  407. function onPermissionListEvent(serverConnectionHandlerID, permissionID, permissionName, permissionDescription)
  408.     debugPrint("Lua: onPermissionListEvent: " .. serverConnectionHandlerID .. " " .. permissionID .. " " .. permissionName .. " " .. permissionDescription)
  409.     for script,events in pairs(ts3RegisteredModules) do
  410.         if events.onPermissionListEvent ~= nil then
  411.             events.onPermissionListEvent(serverConnectionHandlerID, permissionID, permissionName, permissionDescription)
  412.         end
  413.     end
  414. end
  415.  
  416. function onPermissionListFinishedEvent(serverConnectionHandlerID)
  417.     debugPrint("Lua: onPermissionListFinishedEvent: " .. serverConnectionHandlerID)
  418.     for script,events in pairs(ts3RegisteredModules) do
  419.         if events.onPermissionListFinishedEvent ~= nil then
  420.             events.onPermissionListFinishedEvent(serverConnectionHandlerID)
  421.         end
  422.     end
  423. end
  424.  
  425. function onPermissionOverviewEvent(serverConnectionHandlerID, clientDatabaseID, channelID, overviewType, overviewID1, overviewID2, permissionID, permissionValue, permissionNegated, permissionSkip)
  426.     debugPrint("Lua: onPermissionOverviewEvent: " .. serverConnectionHandlerID .. " " .. clientDatabaseID .. " " .. channelID .. " " .. overviewType .. " " .. overviewID1 .. " " .. overviewID2 .. " " .. permissionID .. " " .. permissionValue .. " " .. permissionNegated .. " " .. permissionSkip)
  427.     for script,events in pairs(ts3RegisteredModules) do
  428.         if events.onPermissionOverviewEvent ~= nil then
  429.             events.onPermissionOverviewEvent(serverConnectionHandlerID, clientDatabaseID, channelID, overviewType, overviewID1, overviewID2, permissionID, permissionValue, permissionNegated, permissionSkip)
  430.         end
  431.     end
  432. end
  433.  
  434. function onPermissionOverviewFinishedEvent(serverConnectionHandlerID)
  435.     debugPrint("Lua: onPermissionOverviewFinishedEvent: " .. serverConnectionHandlerID)
  436.     for script,events in pairs(ts3RegisteredModules) do
  437.         if events.onPermissionOverviewFinishedEvent ~= nil then
  438.             events.onPermissionOverviewFinishedEvent(serverConnectionHandlerID)
  439.         end
  440.     end
  441. end
  442.  
  443. function onServerGroupClientAddedEvent(serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)
  444.     debugPrint("Lua: onServerGroupClientAddedEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. clientName .. " " .. clientUniqueIdentity .. " " .. serverGroupID .. " " .. invokerClientID .. " " .. invokerName .. " " .. invokerUniqueIdentity)
  445.     for script,events in pairs(ts3RegisteredModules) do
  446.         if events.onServerGroupClientAddedEvent ~= nil then
  447.             events.onServerGroupClientAddedEvent(serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)
  448.         end
  449.     end
  450. end
  451.  
  452. function onServerGroupClientDeletedEvent(serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)
  453.     debugPrint("Lua: onServerGroupClientDeletedEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. clientName .. " " .. clientUniqueIdentity .. " " .. serverGroupID .. " " .. invokerClientID .. " " .. invokerName .. " " .. invokerUniqueIdentity)
  454.     for script,events in pairs(ts3RegisteredModules) do
  455.         if events.onServerGroupClientDeletedEvent ~= nil then
  456.             events.onServerGroupClientDeletedEvent(serverConnectionHandlerID, clientID, clientName, clientUniqueIdentity, serverGroupID, invokerClientID, invokerName, invokerUniqueIdentity)
  457.         end
  458.     end
  459. end
  460.  
  461. function onClientNeededPermissionsEvent(serverConnectionHandlerID, permissionID, permissionValue)
  462.     debugPrint("Lua: onClientNeededPermissionsEvent: " .. serverConnectionHandlerID .. " " .. permissionID .. " " .. permissionValue)
  463.     for script,events in pairs(ts3RegisteredModules) do
  464.         if events.onClientNeededPermissionsEvent ~= nil then
  465.             events.onClientNeededPermissionsEvent(serverConnectionHandlerID, permissionID, permissionValue)
  466.         end
  467.     end
  468. end
  469.  
  470. function onClientNeededPermissionsFinishedEvent(serverConnectionHandlerID)
  471.     debugPrint("Lua: onClientNeededPermissionsFinishedEvent: " .. serverConnectionHandlerID)
  472.     for script,events in pairs(ts3RegisteredModules) do
  473.         if events.onClientNeededPermissionsFinishedEvent ~= nil then
  474.             events.onClientNeededPermissionsFinishedEvent(serverConnectionHandlerID)
  475.         end
  476.     end
  477. end
  478.  
  479. function onClientChatClosedEvent(serverConnectionHandlerID, clientID, clientUniqueIdentity)
  480.     debugPrint("Lua: onClientChatClosedEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. clientUniqueIdentity)
  481.     for script,events in pairs(ts3RegisteredModules) do
  482.         if events.onClientChatClosedEvent ~= nil then
  483.             events.onClientChatClosedEvent(serverConnectionHandlerID, clientID, clientUniqueIdentity)
  484.         end
  485.     end
  486. end
  487.  
  488. function onClientChatComposingEvent(serverConnectionHandlerID, clientID, clientUniqueIdentity)
  489.     debugPrint("Lua: onClientChatComposingEvent: " .. serverConnectionHandlerID .. " " .. clientID .. " " .. clientUniqueIdentity)
  490.     for script,events in pairs(ts3RegisteredModules) do
  491.         if events.onClientChatComposingEvent ~= nil then
  492.             events.onClientChatComposingEvent(serverConnectionHandlerID, clientID, clientUniqueIdentity)
  493.         end
  494.     end
  495. end
  496.  
  497. function onServerLogEvent(serverConnectionHandlerID, logMsg)
  498.     debugPrint("Lua: onServerLogEvent: " .. serverConnectionHandlerID .. " " .. logMsg)
  499.     for script,events in pairs(ts3RegisteredModules) do
  500.         if events.onServerLogEvent ~= nil then
  501.             events.onServerLogEvent(serverConnectionHandlerID, logMsg)
  502.         end
  503.     end
  504. end
  505.  
  506. function onServerLogFinishedEvent(serverConnectionHandlerID, lastPos, fileSize)
  507.     debugPrint("Lua: onServerLogFinishedEvent: " .. serverConnectionHandlerID .. " " .. lastPos .. " " .. fileSize)
  508.     for script,events in pairs(ts3RegisteredModules) do
  509.         if events.onServerLogFinishedEvent ~= nil then
  510.             events.onServerLogFinishedEvent(serverConnectionHandlerID, lastPos, fileSize)
  511.         end
  512.     end
  513. end
  514.  
  515. function onMessageListEvent(serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, timestamp, flagRead)
  516.     debugPrint("Lua: onMessageListEvent: " .. serverConnectionHandlerID .. " " .. messageID .. " " .. fromClientUniqueIdentity .. " " .. subject .. " " .. timestamp .. " " .. flagRead)
  517.     for script,events in pairs(ts3RegisteredModules) do
  518.         if events.onMessageListEvent ~= nil then
  519.             events.onMessageListEvent(serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, timestamp, flagRead)()
  520.         end
  521.     end
  522. end
  523.  
  524. function onMessageGetEvent(serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, message, timestamp)
  525.     debugPrint("Lua: onMessageGetEvent: " .. serverConnectionHandlerID .. " " .. messageID .. " " .. fromClientUniqueIdentity .. " " .. subject .. " " .. message .. " " .. timestamp)
  526.     for script,events in pairs(ts3RegisteredModules) do
  527.         if events.onMessageGetEvent ~= nil then
  528.             events.onMessageGetEvent(serverConnectionHandlerID, messageID, fromClientUniqueIdentity, subject, message, timestamp)
  529.         end
  530.     end
  531. end
  532.  
  533. function onClientDBIDfromUIDEvent(serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID)
  534.     debugPrint("Lua: onClientDBIDfromUIDEvent: " .. serverConnectionHandlerID .. " " .. uniqueClientIdentifier .. " " .. clientDatabaseID)
  535.     for script,events in pairs(ts3RegisteredModules) do
  536.         if events.onClientDBIDfromUIDEvent ~= nil then
  537.             events.onClientDBIDfromUIDEvent(serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID)
  538.         end
  539.     end
  540. end
  541.  
  542. function onClientNamefromUIDEvent(serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)
  543.     debugPrint("Lua: onClientNamefromUIDEvent: " .. serverConnectionHandlerID .. " " .. uniqueClientIdentifier .. " " .. clientDatabaseID .. " " .. clientNickName)
  544.     for script,events in pairs(ts3RegisteredModules) do
  545.         if events.onClientNamefromUIDEvent ~= nil then
  546.             events.onClientNamefromUIDEvent(serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)
  547.         end
  548.     end
  549. end
  550.  
  551. function onClientNamefromDBIDEvent(serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)
  552.     debugPrint("Lua: onClientNamefromDBIDEvent: " .. serverConnectionHandlerID .. " " .. uniqueClientIdentifier .. " " .. clientDatabaseID .. " " .. clientNickName)
  553.     for script,events in pairs(ts3RegisteredModules) do
  554.         if events.onClientNamefromDBIDEvent ~= nil then
  555.             events.onClientNamefromDBIDEvent(serverConnectionHandlerID, uniqueClientIdentifier, clientDatabaseID, clientNickName)
  556.         end
  557.     end
  558. end
  559.  
  560. function onComplainListEvent(serverConnectionHandlerID, targetClientDatabaseID, targetClientNickName, fromClientDatabaseID, fromClientNickName, complainReason, timestamp)
  561.     debugPrint("Lua: onComplainListEvent: " .. serverConnectionHandlerID .. " " .. targetClientDatabaseID .. " " .. targetClientNickName .. " " .. fromClientDatabaseID .. " " .. fromClientNickName .. " " .. complainReason .. " " .. timestamp)
  562.     for script,events in pairs(ts3RegisteredModules) do
  563.         if events.onComplainListEvent ~= nil then
  564.             events.onComplainListEvent(serverConnectionHandlerID, targetClientDatabaseID, targetClientNickName, fromClientDatabaseID, fromClientNickName, complainReason, timestamp)
  565.         end
  566.     end
  567. end
  568.  
  569. function onBanListEvent(serverConnectionHandlerID, banid, ip, name, uid, creationTime, durationTime, invokerName, invokercldbid, invokeruid, numberOfEnforcements, lastNickName)
  570.     debugPrint("Lua: onBanListEvent: " .. serverConnectionHandlerID .. " " .. banid .. " " .. ip .. " " .. name .. " " .. uid .. " " .. creationTime .. " " .. durationTime .. " " .. invokerName .. " " .. invokercldbid .. " " .. invokeruid .. " " .. numberOfEnforcements .. " " .. lastNickName)
  571.     for script,events in pairs(ts3RegisteredModules) do
  572.         if events.onBanListEvent ~= nil then
  573.             events.onBanListEvent(serverConnectionHandlerID, banid, ip, name, uid, creationTime, durationTime, invokerName, invokercldbid, invokeruid, numberOfEnforcements, lastNickName)
  574.         end
  575.     end
  576. end
  577.  
  578. function onClientServerQueryLoginPasswordEvent(serverConnectionHandlerID, loginPassword)
  579.     debugPrint("Lua: onClientServerQueryLoginPasswordEvent: " .. serverConnectionHandlerID .. " " .. loginPassword)
  580.     for script,events in pairs(ts3RegisteredModules) do
  581.         if events.onClientServerQueryLoginPasswordEvent ~= nil then
  582.             events.onClientServerQueryLoginPasswordEvent(serverConnectionHandlerID, loginPassword)
  583.         end
  584.     end
  585. end
  586.  
  587. function onPluginCommandEvent(serverConnectionHandlerID, pluginName, pluginCommand)
  588.     debugPrint("Lua: onPluginCommandEvent: " .. serverConnectionHandlerID .. " " .. pluginName .. " " .. pluginCommand)
  589.     for script,events in pairs(ts3RegisteredModules) do
  590.         if events.onPluginCommandEvent ~= nil then
  591.             events.onPluginCommandEvent(serverConnectionHandlerID, pluginName, pluginCommand)
  592.         end
  593.     end
  594. end
  595.  
  596. function onServerTemporaryPasswordListEvent(serverConnectionHandlerID, clientNickname, uniqueClientIdentifier, description, password, timestampStart, timestampEnd, targetChannelID, targetChannelPW)
  597.     debugPrint("Lua: onServerTemporaryPasswordListEvent: " .. serverConnectionHandlerID .. " " .. clientNickname .. " " .. uniqueClientIdentifier .. " " .. description .. " " .. password .. " " .. timestampStart .. " " .. timestampEnd .. " " .. targetChannelID .. " " .. targetChannelPW)
  598.     for script,events in pairs(ts3RegisteredModules) do
  599.         if events.onServerTemporaryPasswordListEvent ~= nil then
  600.             events.onServerTemporaryPasswordListEvent(serverConnectionHandlerID, clientNickname, uniqueClientIdentifier, description, password, timestampStart, timestampEnd, targetChannelID, targetChannelPW)
  601.         end
  602.     end
  603. end
  604.  
  605. function onMenuItemEvent(serverConnectionHandlerID, menuType, menuItemID, selectedItemID)
  606.     debugPrint("Lua: onMenuItemEvent: " .. serverConnectionHandlerID .. " " .. menuType .. " " .. menuItemID .. " " .. selectedItemID)
  607.     local n = 1
  608.     for script,events in pairs(ts3RegisteredModules) do
  609.         if events.onMenuItemEvent ~= nil then
  610.             if math.floor(menuItemID / moduleMenuItemID) == n then
  611.                 events.onMenuItemEvent(serverConnectionHandlerID, menuType, menuItemID % moduleMenuItemID, selectedItemID)
  612.             end
  613.         end
  614.         n = n + 1
  615.     end
  616. end
RAW Paste Data