调整公告解析,自制一个简单的分语言公告格式

This commit is contained in:
MrZ626
2021-09-22 09:41:53 +08:00
parent 56cbe4c5b6
commit a2da057581

View File

@@ -78,8 +78,18 @@ end
--Parse notice
local function _parseNotice(str)
str=STRING.split(str,"///")
return str[SETTING.locale<=3 and 1 or 2]or str[1]
if str:find("///")then
str=STRING.split(str,"///")
for i=1,#str do
local m=str[i]
if m:find("=")then
str[m:sub(1,m:find("=")-1)]=m:sub(1,m:find("=")+1)
end
end
return str[SETTING.locale]or str[1]
else
return str
end
end
--WS close message