2016-09-06 04:43:17 +02:00
|
|
|
local dat = {}
|
|
|
|
local info, ver
|
|
|
|
local datread = require("data/load_dat")
|
2016-11-09 15:25:54 +01:00
|
|
|
do
|
2019-11-29 17:17:34 +01:00
|
|
|
local buttonchar
|
|
|
|
local function convert(str)
|
|
|
|
if not buttonchar then buttonchar = require("data/button_char") end
|
|
|
|
return buttonchar(str)
|
|
|
|
end
|
2021-10-25 03:46:57 +02:00
|
|
|
datread, ver = datread.open("command.dat", "#[^V]*Ver[^.:]*[.:]", convert)
|
2016-11-09 15:25:54 +01:00
|
|
|
end
|
2016-09-06 04:43:17 +02:00
|
|
|
|
|
|
|
function dat.check(set, softlist)
|
|
|
|
if softlist or not datread then
|
|
|
|
return nil
|
|
|
|
end
|
|
|
|
local status
|
|
|
|
status, info = pcall(datread, "cmd", "info", set)
|
|
|
|
if not status or not info then
|
|
|
|
return nil
|
|
|
|
end
|
2021-10-31 02:31:16 +01:00
|
|
|
return _p("plugin-data", "Command")
|
2016-09-06 04:43:17 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function dat.get()
|
|
|
|
return info
|
|
|
|
end
|
|
|
|
|
2017-07-28 05:14:09 +02:00
|
|
|
function dat.ver()
|
|
|
|
return ver
|
|
|
|
end
|
|
|
|
|
2016-09-06 04:43:17 +02:00
|
|
|
return dat
|