From 9398d0d4a930f9029d2f69db6c5bfbd71b499dfd Mon Sep 17 00:00:00 2001 From: Gamer025 <33846895+Gamer025@users.noreply.github.com> Date: Wed, 2 Feb 2022 06:30:48 +0100 Subject: [PATCH] Fix stickyban SS runtiming on initialize (#64586) Stickyban SS no longer runtimes if there is broken entries in the DB and instead notifes admins --- code/controllers/subsystem/stickyban.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/controllers/subsystem/stickyban.dm b/code/controllers/subsystem/stickyban.dm index c61ea9943ed..7d027cb845d 100644 --- a/code/controllers/subsystem/stickyban.dm +++ b/code/controllers/subsystem/stickyban.dm @@ -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