From 95ac4866b4597422bc2f29ad897bb6d529c6d2ba Mon Sep 17 00:00:00 2001 From: Gerard Hickey Date: Mon, 19 Aug 2024 01:50:32 -0400 Subject: [PATCH] Update zone name discovery to ignore icon metadata Signed-off-by: Gerard Hickey --- meshchatlib.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meshchatlib.lua b/meshchatlib.lua index f409ea2..e9a4492 100755 --- a/meshchatlib.lua +++ b/meshchatlib.lua @@ -89,7 +89,10 @@ function zone_name() if nixio.fs.access(servfile) then for line in io.lines(servfile) do - local zone = line:match("^(.*)|.*|.*|.*|.*|meshchat$") + -- this will match the new service names with the icon metadata + -- in this case we are using a space or a pipe to terminate + -- the service name + local zone = line:match("^(.-)[%s%|].*|meshchat$") if zone then return zone end