Implement adding notes

This commit is contained in:
2025-01-15 11:55:02 +01:00
parent ec2f146095
commit 0bed5ecf41

View File

@@ -170,9 +170,13 @@ function shared.Noter.Init()
shared.dumpTable(args)
local note = {
source = sender,
date = date(),
date = date("%Y-%m-%dT%H:%M:%S"),
note = args[3]
}
if Heimdall_Data.config.noter.debug then
print(string.format("[%s] Adding note for: %s", ModuleName, name))
shared.dumpTable(note)
end
table.insert(Heimdall_Data.config.notes[name], note)
end
@@ -239,10 +243,10 @@ function shared.Noter.Init()
end
if note == "delete" then
DeleteNotes(name, args)
elseif string.find(note, "%D+") then
AddNote(name, sender, args)
elseif string.find(note, "[%d%.]*") then
PrintNotes(name, args)
else
AddNote(name, sender, args)
end
end
end)