Closed ctm closed 3 months ago
The player name override code is more than a little hinky, in that Table
contains a VecDeque<Timeout>
override_timeouts
field that is used to clean up the overrides, but the overrides themselves are in the player_name_override
field of PlayerInfo
and they simply contain a DateTime<Utc>
that is checked when cleanup_player_name_override
is called. This means that an override scheduled by the Table
has the obligation of updating override_timeouts
and ActionTracker
itself has no way to do so. That may have worked when all the overrides were set from Table
, but now there are a few that are set from ActionTracker
.
The solution, of course, is to totally get rid of override_timeouts
and put the Timeout
in PlayerNameOverride
(which is the struct that PlayerInfo
uses for the other data about the override). That means we have to pass a callback for Table
into ActionTracker
.
I'll do this later today. It's trivial to do now, but I'd like to run a little and get cleaned up before heading out.
Fixed and merged into master. It'll go out with the next deploy, which I'll try to do before this evening's game.
Make it so if someone mucks just before the break starts, the "Muck" changes back to the username.