From 5bb2fda5fd1900a2a64ad9de106f10e9a42a8de6 Mon Sep 17 00:00:00 2001 From: TAT Date: Sun, 4 May 2014 21:49:13 +0200 Subject: [PATCH] Deprecate moderateUnBanUser Use moderateUnbanUser instead --- src/client.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index e7b35ed..21d0c83 100644 --- a/src/client.js +++ b/src/client.js @@ -1080,7 +1080,16 @@ PlugAPI.prototype.moderateBanUser = function(userid, reason, duration, callback) } PlugAPI.prototype.moderateUnBanUser = function(userid, callback) { - return queueGateway(rpcNames.MODERATE_UNBAN, [userid], callback); + console.error('Using deprecated moderateUnBanUser - change to moderateUnbanUser'); + return this.moderateUnbanUser(userid, callback); +} + +PlugAPI.prototype.moderateUnbanUser = function(userid, callback) { + // Check: Have permission + if (this.getUser().permission < this.ROLE.MANAGER) + return false; + queueGateway(rpcNames.MODERATE_UNBAN, [userid], callback); + return true; } PlugAPI.prototype.moderateForceSkip = function(callback) {