added format_as_temp_var

This commit is contained in:
Cooldude2606
2017-08-21 10:47:04 +01:00
parent c8fe775cf9
commit 1f1f5e4de4
2 changed files with 6 additions and 0 deletions

View File

@@ -42,6 +42,10 @@ function sudo(command,args,custom_return_name)
return {sudo='sudo-temp-var',name=return_name}
end
end
--turns a string into the temp var format so that it can be used
function format_as_temp_var(string)
return {sudo='sudo-temp-var',name=tostring(string)}
end
--update the time on a temp var or add it as a new one
function refresh_temp_var(name,value,offset)
local offset = offset or temp_var_time