Fix regex for current neighbor midxx.hostname (#110)

This commit is contained in:
Steve AB7PA 2021-05-22 21:45:00 -07:00 committed by GitHub
parent 79a57a0021
commit 10ff6f512f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -71,12 +71,12 @@ function model.getCurrentNeighbors(RFinfo)
info[remip]['linkQuality']=v['linkQuality']
info[remip]['neighborLinkQuality']=v['neighborLinkQuality']
if remhost ~= nil then
host = string.gsub(remhost,"dtdlink%.", "")
host = string.lower(remhost)
end
if host ~= nil then
host = string.gsub(host,"mid%d.", "")
host = string.gsub(host,"mid%d+.", "")
host = string.gsub(host,"dtdlink%.", "")
host = string.gsub(host,".local.mesh$","")
host = string.lower(host)
info[remip]['hostname']=host
else
info[remip]['hostname']=remip