From 1219bbca3832eaf223cc685f5d8bc3926eec0b68 Mon Sep 17 00:00:00 2001 From: Holly Date: Wed, 23 Feb 2022 03:23:11 +0000 Subject: [PATCH] Add throw if the there is an attempt to remove the bot --- server/serverHandler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/serverHandler.js b/server/serverHandler.js index 182138c..add89c8 100644 --- a/server/serverHandler.js +++ b/server/serverHandler.js @@ -20,6 +20,11 @@ global.addUser = function(uuid, userToAdd) { } global.removeUser = function(userToRemove) { + // This should be safe to do since we should be in a try-catch at all times + // I just want a trace of how this is happening. + if (userToRemove.uuid == "bot") + throw "Tried to remove the bot user!"; + delete userToRemove; global.refreshUserKeys(); }