registrar

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

commit f7bb7f945e1c2001597985ea3a8130c3d689a0bd
parent 1f693a8d651b0002d6bfbff1d69d89bd43c3cb29
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date:   Mon, 27 Jan 2025 10:49:51 -0300

Add a birthday property to players

This allows player-specified birthdays as per R2585.

Diffstat:
Mlib/birthday.lua | 8++++++--
Mplayers.json | 1+
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/birthday.lua b/lib/birthday.lua @@ -41,8 +41,12 @@ function birthday(args, players, log) end local original = "xxxx-xx-xx" - for _,e in ipairs(players[args.name].history) do - original = math.min(original, e.registration) + if players[args.name].birthday then + original = players[args.name].birthday + else + for _,e in ipairs(players[args.name].history) do + original = math.min(original, e.registration) + end end local this_birthday = os.date("%Y") .. "-" .. string.sub(original, 6) diff --git a/players.json b/players.json @@ -2664,6 +2664,7 @@ ] }, "Murphy": { + "birthday": "1996-01-19", "history": [ { "contact": "emurphy42@socal.rr.com",