commit 36e8f2f5ad96f9272590468a06ccc0bbcb2b82fa
parent 74eb4c9ce5e385b4daf0c89c54558fff472e099c
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date: Fri, 8 Sep 2023 13:04:41 -0300
lib/registration: Fix logging and pretending
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/lib/registration.lua b/lib/registration.lua
@@ -67,10 +67,19 @@ function _M.register(args, players, log, ts)
contact = args.contact,
latest = os.date("%Y-%m-%d", args.date)
}
+ local ev = {
+ what = "register",
+ who = args.name,
+ when = args.date,
+ where = args.m,
+ whence = args.contact
+ }
if not args.p then
table.insert(players[args.name], reg)
+ table.insert(log, ev)
else
io.write(pprint.pprint(reg))
+ io.write(pprint.pprint(ev))
end
end
diff --git a/registrar b/registrar
@@ -27,6 +27,7 @@ deregister_cmd:option("-m", "Message ID of deregistration (without 'message://'
local register_cmd = parser:command("register", "Register player")
register_cmd:argument("name", "The name of the player")
+register_cmd:argument("contact", "URL (or plain email address) to contact player")
register_cmd:argument("date", "Time stamp of registration (seconds after epoch)")
register_cmd:option("-m", "Message ID of registration (without 'message://' prefix)")