home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Narzedzia
/
TeamSpeak
/
TeamSpeak3-Client-win32-3.0.0.exe
/
plugins
/
lua_plugin
/
testmodule
/
events.lua
< prev
next >
Wrap
Text File
|
2011-01-24
|
2KB
|
35 lines
--
-- Testmodule callback functions
--
-- To avoid function name collisions, you should use local functions and export them with a unique package name.
--
local function onConnectStatusChangeEvent(serverConnectionHandlerID, status, errorNumber)
print("TestModule: onConnectStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. errorNumber)
end
local function onNewChannelEvent(serverConnectionHandlerID, channelID, channelParentID)
print("TestModule: onNewChannelEvent: " .. serverConnectionHandlerID .. " " .. channelID .. " " .. channelParentID)
end
local function onTalkStatusChangeEvent(serverConnectionHandlerID, status, isReceivedWhisper, clientID)
print("TestModule: onTalkStatusChangeEvent: " .. serverConnectionHandlerID .. " " .. status .. " " .. isReceivedWhisper .. " " .. clientID)
end
function onTextMessageEvent(serverConnectionHandlerID, targetMode, toID, fromID, fromName, fromUniqueIdentifier, message, ffIgnored)
print("Testmodule: onTextMessageEvent: " .. serverConnectionHandlerID .. " " .. targetMode .. " " .. toID .. " " .. fromID .. " " .. fromName .. " " .. fromUniqueIdentifier .. " " .. message .. " " .. ffIgnored)
return 0
end
function onPluginCommandEvent(serverConnectionHandlerID, pluginName, pluginCommand)
print("Testmodule: onPluginCommandEvent: " .. serverConnectionHandlerID .. " " .. pluginName .. " " .. pluginCommand)
end
testmodule_events = {
onConnectStatusChangeEvent = onConnectStatusChangeEvent,
onNewChannelEvent = onNewChannelEvent,
onTalkStatusChangeEvent = onTalkStatusChangeEvent,
onTextMessageEvent = onTextMessageEvent,
onPluginCommandEvent = onPluginCommandEvent
}