iteration

This commit is contained in:
Layla 2023-10-08 01:59:14 -04:00
parent f63ab77fc1
commit eb55a5d783

View File

@ -63,7 +63,6 @@ function lns_lookup(remote_hostname)
end end
load_cache()
local action = args[1] local action = args[1]
if action == nil then if action == nil then
@ -72,6 +71,8 @@ if action == nil then
end end
if action == "lookup" then if action == "lookup" then
load_cache()
local hostname = args[2] local hostname = args[2]
if hostname == nil then if hostname == nil then
io.write("Usage: lns lookup <hostname>\n") io.write("Usage: lns lookup <hostname>\n")
@ -92,5 +93,6 @@ if action == "lookup" then
elseif action == "clear" then elseif action == "clear" then
cache = {} cache = {}
save_cache()
print("Cleared cache!") print("Cleared cache!")
end end