commit ae5c6ae3588d51838b46ec81a0635cdc7c209330 Author: jwetzell Date: Thu Apr 23 13:46:48 2026 +0000 add caller.qplug diff --git a/caller.qplug b/caller.qplug new file mode 100644 index 0000000..bdb3ad7 --- /dev/null +++ b/caller.qplug @@ -0,0 +1,66 @@ +PluginInfo = { + Name = "Caller", + Version = "0.1.0-master", + Id = "Caller.plugin.0.1.0-master", + Description = "Plugin for taking incoming call objects and maintaining a queue", + Author = "Joel Wetzell" +} +require("json") + +function GetPrettyName() + return "Caller" +end + +function GetProperties() + local props = {} + return props +end + +function RectifyProperties(props) + return props +end + +function GetControls(props) + local controls = { + { + Name = "QueueUp", + ControlType = "Button", + ButtonType = "Toggle", + PinStyle = "Both", + UserPin = true + }, + { + Name = "CallOut", + ControlType = "Text", + PinStyle = "Output", + UserPin = true + }, + { + Name = "CallerName", + ControlType = "Text", + PinStyle = "Input", + UserPin = true + } + } + return controls +end + +function Initialize() +end + +function SetupControlHandlers() + Controls["QueueUp"].EventHandler = function (ctrl) + local call = { + Queue = ctrl.Boolean, + Name = Controls["CallerName"].String, + Time = os.time() + } + local callString = json.encode(call) + Controls["CallOut"].String = json.encode(call) + end +end + +if(Controls) then + Initialize() + SetupControlHandlers() +end \ No newline at end of file