Add an event to config reloading that can be used to trigger a config sync (#90329)

This commit is contained in:
Jordan Dominion
2025-03-30 20:44:23 +00:00
committed by GitHub
parent b62483402d
commit a834a92ed6
3 changed files with 21 additions and 3 deletions
+5 -1
View File
@@ -211,7 +211,11 @@ GLOBAL_PROTECT(protected_ranks)
/// (Re)Loads the admin list.
/// returns TRUE if database admins had to be loaded from the backup json
/proc/load_admins(no_update)
/proc/load_admins(no_update, initial = FALSE)
if(!initial)
if(!global.config.PreConfigReload())
return
var/dbfail
if(!CONFIG_GET(flag/admin_legacy_system) && !SSdbcore.Connect())
message_admins("Failed to connect to database while loading admins. Loading from backup.")