Merge pull request #1320 from jd4564/master

Fix a crash in /forcepromote
This commit is contained in:
Guangcong Luo
2014-11-23 00:29:26 +08:00

View File

@@ -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.");