调整公告解析,自制一个简单的分语言公告格式
This commit is contained in:
@@ -78,8 +78,18 @@ end
|
|||||||
|
|
||||||
--Parse notice
|
--Parse notice
|
||||||
local function _parseNotice(str)
|
local function _parseNotice(str)
|
||||||
str=STRING.split(str,"///")
|
if str:find("///")then
|
||||||
return str[SETTING.locale<=3 and 1 or 2]or str[1]
|
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
|
end
|
||||||
|
|
||||||
--WS close message
|
--WS close message
|
||||||
|
|||||||
Reference in New Issue
Block a user