From 14ae1929982b4172a4d7696a334a5b1aa56feec4 Mon Sep 17 00:00:00 2001 From: Derry Date: Fri, 2 Jul 2021 07:51:10 -0700 Subject: [PATCH] Fix the problem of user loss --- luci-app-oaf/luasrc/model/cbi/appfilter/appfilter.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-oaf/luasrc/model/cbi/appfilter/appfilter.lua b/luci-app-oaf/luasrc/model/cbi/appfilter/appfilter.lua index 990dd84..33da977 100755 --- a/luci-app-oaf/luasrc/model/cbi/appfilter/appfilter.lua +++ b/luci-app-oaf/luasrc/model/cbi/appfilter/appfilter.lua @@ -167,7 +167,7 @@ while true do if not line then break end - if not line:match("Id*") then + if not string.match(line, "^Id") then local ip=get_cmd_result(string.format("echo '%s' | awk '{print $3}'", line)) local mac=get_cmd_result(string.format("echo '%s' | awk '{print $2}'", line)) local hostname=get_cmd_result(string.format("echo '%s' | awk '{print $4}'", line)) @@ -176,7 +176,7 @@ while true do if not hostname or hostname == "*" then users:value(mac, mac); else - users:value(mac, hostname); + users:value(mac, hostname.."("..mac..")"); end end end