Merge pull request #294 from Ethan/promote

Return correct command when using /demote
This commit is contained in:
Guangcong Luo 2013-08-12 12:37:32 -07:00
commit b3c9c9a768

View File

@ -613,7 +613,7 @@ var commands = exports.commands = {
return this.sendReply('Group \'' + nextGroup + '\' does not exist.');
}
if (!user.checkPromotePermission(currentGroup, nextGroup)) {
return this.sendReply('/promote - Access denied.');
return this.sendReply('/' + cmd + ' - Access denied.');
}
var isDemotion = (config.groups[nextGroup].rank < config.groups[currentGroup].rank);