Add throw if the there is an attempt to remove the bot
This commit is contained in:
parent
5f5b8457de
commit
1219bbca38
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue