1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| local utils = require('3rd/neolua/libs/utils')
function Main()
local servs = std.Server:GetAllServers()
local v = ShowDatas(servs)
print(v)
end
function ShowDatas(servs)
local rows = {}
foreach coreServ in servs do
local wserv = coreServ:Wrap()
local row = {
wserv:GetIndex(),
wserv:GetLongName(),
wserv:GetSummary(),
wserv:GetMark(),
utils.ToLuaDate(wserv:GetLastModifiedUtcTicks()),
wserv:GetStatus(),
}
table.insert(rows, row)
end
-- print(table.dump(rows))
local columns = {"序号", "名称", "摘要", "标记", "修改日期", "测速"}
return std.Misc:ShowData("服务器列表:", columns, rows, 3)
end
Main()
|