Merge pull request #1179 from Relados/patch-5

Prevent use of modnote while locked or muted
This commit is contained in:
Guangcong Luo 2014-08-30 00:22:01 -05:00
commit 6384b97b1a

View File

@ -803,6 +803,8 @@ var commands = exports.commands = {
mn: 'modnote',
modnote: function (target, room, user, connection) {
if (!target) return this.parse('/help modnote');
if (user.locked || user.mutedRooms[room.id]) return this.sendReply("You cannot do this while unable to talk.");
if (target.length > MAX_REASON_LENGTH) {
return this.sendReply("The note is too long. It cannot exceed " + MAX_REASON_LENGTH + " characters.");
}