registrar

Files related to my duties as Registrar of Agora Nomic
git clone git://juanmeleiro.mat.br/registrar
Log | Files | Refs | README

commit 24e5bb5de7a5727d2d81a042ffca072abe37a528
parent a7fc8d837243644791c8f0fcb1cb47242782f708
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date:   Mon,  9 Oct 2023 17:07:43 -0300

script/registration: Make readdressing ask for date

Diffstat:
Mlib/registration.lua | 2+-
Mregistrar | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/registration.lua b/lib/registration.lua @@ -98,7 +98,7 @@ function _M.readdress(args, players, log) local h = table.query(players[args.who], function (h) return h.reason == "s" end) die(not h, "Player is not registered.") h.contact = args.whither - table.insert(log, {what="readdress", who=args.who, whither=args.whither, where=args.m, when=os.time()}) + table.insert(log, {what="readdress", who=args.who, whither=args.whither, where=args.m, when=args.when}) end return _M diff --git a/registrar b/registrar @@ -58,6 +58,7 @@ rename_cmd:option("-m", "Message ID of renaming (without 'message://' prefix)") local readdress_cmd = parser:command("readdress", "Change player's address") readdress_cmd:argument("who", "Player to be readdressed") readdress_cmd:argument("whither", "New address") +readdress_cmd:argument("when", "When the message was received") readdress_cmd:option("-m", "Message ID of readdressing (without 'message://' prefix)") -- Deserialize @@ -216,4 +217,4 @@ local action = gitactions[args.command] for _,f in ipairs(action.files) do os.execute(string.format("git add %s", f)) end -os.execute(string.format("git commit -m '%s'", action.message(args))) +os.execute(string.format("git commit -m \"%s\"", action.message(args)))