From e57c636d3c968af5327f064e5204e541db267532 Mon Sep 17 00:00:00 2001 From: jd4564 Date: Thu, 20 Nov 2014 05:59:47 -0400 Subject: [PATCH] Fix a crash in /forcepromote --- commands.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands.js b/commands.js index 4d4c3be9e3..8d04213796 100644 --- a/commands.js +++ b/commands.js @@ -1003,6 +1003,7 @@ var commands = exports.commands = { target = this.splitTarget(target, true); var name = this.targetUsername; var nextGroup = target || Users.getNextGroupSymbol(' ', false); + if (!Config.groups[nextGroup]) return this.sendReply("Group '" + nextGroup + "' does not exist."); if (!Users.setOfflineGroup(name, nextGroup, true)) { return this.sendReply("/forcepromote - Don't forcepromote unless you have to.");