gma3-flimr-plugin/flimr-plugin.lua

43 lines
1.3 KiB
Lua

debug = true
local function debug_print(message)
if debug == true then
Printf(tostring(message))
end
end
local function update_groups()
debug_print("Updating groups based of tags.")
end
local function setOVR(channel, argument)
if type(argument) == "number" then
Cmd('Store Group '..argument..' at Group "CASP_OVR Channel '..channel..'" /Overwrite')
debug_print("Updated CASP_OVR Channel "..channel.." to Group "..argument)
elseif type(argument) == "string" then
Cmd('Store Group "'..argument..'" at Group "CASP_OVR Channel '..channel..'" /Overwrite')
debug_print("Updated CASP_OVR Channel "..channel.." to Group "..argument)
end
end
local function main(display_handle, args)
if args then
if string.match(args, ";") then
local operator, argument = args.partition(";")
if operator == "set_OVR_C1" then
setOVR(1, argument)
elseif operator == "set_OVR_C2" then
setOVR(2, argument)
elseif operator == "set_OVR_C3" then
setOVR(3, argument)
elseif operator == "set_OVR_C4" then
setOVR(4, argument)
elseif operator == "set_OVR_C5" then
setOVR(5, argument)
end
end
end
end
return main