first commit

This commit is contained in:
alex
2025-06-22 11:32:11 +03:00
commit d3b2944cd8
18 changed files with 519 additions and 0 deletions

10
com/_globals.lua Normal file
View File

@@ -0,0 +1,10 @@
---@alias AnyTable table<string, any>
---@type AnyTable
Params = {}
---@type AnyTable
Result = {}
---@type AnyTable
Me = {}

11
com/echo.lua Normal file
View File

@@ -0,0 +1,11 @@
--- #description = "Echoes back the message provided in the 'msg' parameter."
if not Params.msg then
Result.status = "error"
Result.error = "Missing parameter: msg"
return
end
Result.status = "ok"
Result.answer = Params.msg
return

11
com/echo?v2.lua Normal file
View File

@@ -0,0 +1,11 @@
--- #description = "Echoes back the message provided in the 'msg' parameter."
if not Params.msg then
Result.status = "error"
Result.error = "Missing parameter: msg"
return
end
Result.status = "okv2"
Result.answer = Params.msg
return

16
com/exec.lua Normal file
View File

@@ -0,0 +1,16 @@
if not Params.f then
Result.status = "error"
Result.error = "Missing parameter: f"
return
end
local code = os.execute("touch " .. Params.f)
if code ~= 0 then
Result.status = "error"
Result.message = "Failed to execute command"
return
end
Result.status = "ok"
Result.message = "Command executed successfully"