聊天处理修改
parent
c3a5e2a30a
commit
b19e21b835
|
@ -2452,26 +2452,29 @@ function GetNewChatMsg(msg)
|
||||||
local list = {}
|
local list = {}
|
||||||
local len = 1
|
local len = 1
|
||||||
local index = 1
|
local index = 1
|
||||||
for i = 1, string.len(msg) do
|
if not msg==nil then
|
||||||
if index == i then
|
for i = 1, string.len(msg) do
|
||||||
local s = string.sub(msg, i, i)
|
if index == i then
|
||||||
if s == "#" then
|
local s = string.sub(msg, i, i)
|
||||||
if #list ~= 0 then
|
if s == "#" then
|
||||||
|
if #list ~= 0 then
|
||||||
|
len = len + 1
|
||||||
|
end
|
||||||
|
list[len] = s..string.sub(msg, i+1, i+1)..string.sub(msg, i+2, i+2)
|
||||||
len = len + 1
|
len = len + 1
|
||||||
end
|
index = i + 3
|
||||||
list[len] = s..string.sub(msg, i+1, i+1)..string.sub(msg, i+2, i+2)
|
|
||||||
len = len + 1
|
|
||||||
index = i + 3
|
|
||||||
else
|
|
||||||
if not list[len] then
|
|
||||||
list[len] = s
|
|
||||||
else
|
else
|
||||||
list[len] = list[len]..s
|
if not list[len] then
|
||||||
|
list[len] = s
|
||||||
|
else
|
||||||
|
list[len] = list[len]..s
|
||||||
|
end
|
||||||
|
index = i + 1
|
||||||
end
|
end
|
||||||
index = i + 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local _list = {}
|
local _list = {}
|
||||||
for key, value in pairs(list) do
|
for key, value in pairs(list) do
|
||||||
table.insert(_list, value)
|
table.insert(_list, value)
|
||||||
|
|
Loading…
Reference in New Issue