From b1cd4e81dcaefbc71d588d09ae2dfbe5ede76d5d Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Tue, 12 Aug 2014 19:10:12 -0400 Subject: [PATCH] New command API sendModCommand Does the same thing as privateModCommand, but without logging it --- command-parser.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/command-parser.js b/command-parser.js index 824bd151ef..c457a5c63e 100644 --- a/command-parser.js +++ b/command-parser.js @@ -236,16 +236,19 @@ var parse = exports.parse = function (message, room, user, connection, levelsDee send: function (data) { room.send(data); }, - privateModCommand: function (data) { + privateModCommand: function (data, noLog) { + this.sendModCommand(data); + this.logEntry(data); + this.logModCommand(data); + }, + sendModCommand: function (data) { for (var i in room.users) { var user = room.users[i]; - // hardcoded for performance reasonss (this is an inner loop) + // hardcoded for performance reasons (this is an inner loop) if (user.isStaff || (room.auth && (room.auth[user.userid] || '+') !== '+')) { user.sendTo(room, data); } } - this.logEntry(data); - this.logModCommand(data); }, logEntry: function (data) { room.logEntry(data);