aboutsummaryrefslogtreecommitdiff
path: root/src/pawsd/tag.lua
diff options
context:
space:
mode:
authorAutumn <git@autumnfo.rest>2026-05-17 17:22:58 +0100
committerAutumn <git@autumnfo.rest>2026-05-17 17:22:58 +0100
commite7563787be5b3a9c1de66a7f4eb16ed09d9d4a21 (patch)
tree2956aed96a4d1873ac997bc17ad224815ba4bbb5 /src/pawsd/tag.lua
parent2bad2793f33c3c0879d3a8a36de327a6626c32ed (diff)
[main] added ability to fetch service & tidied up functions
Diffstat (limited to 'src/pawsd/tag.lua')
-rw-r--r--src/pawsd/tag.lua14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/pawsd/tag.lua b/src/pawsd/tag.lua
index f4031f4..b5997b0 100644
--- a/src/pawsd/tag.lua
+++ b/src/pawsd/tag.lua
@@ -22,28 +22,22 @@ function gettagvalue (response, offset)
local valuetypes = gettagtypes(response, offset)
- print("T>--------- Tag (High): " .. valuetypes.high)
- print("T>--------- Tag (Low): " .. valuetypes.low)
-
local valuelength = tonumber(table.extracthex(response, offset + 16, offset + 19), 16)
local valueoffset = offset + 20
local value = ""
- print("\nT>--------- Length: " .. valuelength)
- print("T>--------- Value Offset: " .. valueoffset)
-
if valuelength > 0 then
value = table.extracthex(response, valueoffset, valueoffset + valuelength)
valueoffset = valueoffset + valuelength
- print("\nT>--------- Value (Hex): " .. value)
- print("T>--------- Value (Binary): " .. string.fromhex(value))
-
end
return {
- value = value,
+ tag = {
+ types = valuetypes,
+ value = value
+ },
endoffset = valueoffset
}