if v[1].text:find("-------------------") or v[1].text:find("There is no player with that name.") or v[1].text:find("You found nobody online with the name") or v[1].text:find("{scan}") or v[1].text:find("{/scan}") then
foundStart = true
for indexEnd = #tbl, 1, -1 do
if tbl[indexEnd][1].text:find("-------------------") or tbl[indexEnd][1].text:find("There is no player with that name.") or tbl[indexEnd][1].text:find("You found nobody online with the name") then
table.move(tbl, indexStart, indexEnd, 1)
local len = indexEnd - indexStart + 1
table.move(tbl, #tbl + 1, #tbl*2 - len, len+1)
foundStart = false
return tbl
end
end
end
end
return tbl
end
function onInfoRequest(name, line, wildcards)
function onInfoRequest(name, line, wildcards)
if not WindowInfo("PlayerInfo", 1) then OnPluginInstall() end
if not WindowInfo("PlayerInfo", 1) then OnPluginInstall() end
@ -122,15 +100,38 @@ function onInfoRequest(name, line, wildcards)
end
end
function addToWindow(lines)
function addToWindow(lines)
local slines = findBoundaries(lines)
foundStartIdx = 0
InfoWin:clear(false)
InfoWin:clear(false)
if #slines > 0 then
InfoWin:add_text(slines, false)
for indexStart, v in ipairs(lines) do
else
local vText = v[1].text
InfoWin:add_text(lines, false)
if vText:find("%-+") or vText:find("There is no player with that name%.") or vText:find("You found nobody online with the name '%w+'%.") then
foundStartIdx = indexStart
break
end
end
end
if foundStartIdx ~= 0 then
for indexEnd = #lines, 1, -1 do
vText = lines[indexEnd][1].text
if vText:find("%-+") or vText:find("There is no player with that name%.") or vText:find("You found nobody online with the name '%w+'%.") then