Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
Deprecate moderateUnBanUser
Browse files Browse the repository at this point in the history
Use moderateUnbanUser instead
  • Loading branch information
TATDK committed May 4, 2014
1 parent b7e2579 commit 5bb2fda
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5bb2fda

Please sign in to comment.