Fix stickyban SS runtiming on initialize (#64586)

Stickyban SS no longer runtimes if there is broken entries in the DB and instead notifes admins
This commit is contained in:
Gamer025
2022-02-02 06:30:48 +01:00
committed by GitHub
parent c7bb1cc9dd
commit 9398d0d4a9
+6
View File
@@ -44,6 +44,12 @@ SUBSYSTEM_DEF(stickyban)
if (ckey != bannedkey)
world.SetConfig("ban", bannedkey, null)
//get_stickyban_from_ckey returned null, aka something broke. Notify admins about it
if (!ban)
message_admins("Failed to apply stickyban for [bannedkey]. Check the DB for corrupt stickyban entries.")
log_admin_private ("Failed to apply stickyban for [bannedkey]. Check the DB for corrupt stickyban entries.")
continue
if (!ban["ckey"])
ban["ckey"] = ckey