diff --git a/com/_prepare.lua b/com/_prepare.lua index 5a2ce63..63b109a 100644 --- a/com/_prepare.lua +++ b/com/_prepare.lua @@ -1,3 +1,5 @@ +package.path = "./com/?.lua;" .. package.path + print = function() end io.write = function(...) end io.stdout = function() return nil end diff --git a/com/echo?s2.lua b/com/echo.lua similarity index 74% rename from com/echo?s2.lua rename to com/echo.lua index c2fb1b6..0b967e2 100644 --- a/com/echo?s2.lua +++ b/com/echo.lua @@ -1,5 +1,7 @@ --- #description = "Echoes back the message provided in the 'msg' parameter." +local mod = require("_for_echo") + if not Params.msg then Result.status = "error" Result.error = "Missing parameter: msg" @@ -7,5 +9,5 @@ if not Params.msg then end Result.status = "ok" -Result.answer = Params.msg +Result.answer = mod.translate(Params.msg) return \ No newline at end of file diff --git a/com/echo?b1.lua b/com/echo?b1.lua deleted file mode 100644 index 5cb7b41..0000000 --- a/com/echo?b1.lua +++ /dev/null @@ -1,11 +0,0 @@ ---- #description = "Echoes back the message provided in the 'msg' parameter. b1" - -if not Params.msg then - Result.status = "error" - Result.error = "Missing parameter: msg" - return -end - -Result.status = "okv2" -Result.answer = Params.msg -return \ No newline at end of file