Permissions check for /kick

This commit is contained in:
Calvin Montgomery 2013-05-27 00:45:08 -04:00
parent 81d6b4873d
commit 1c2728c9f8

View file

@ -61,7 +61,8 @@ function handleKick(chan, user, args) {
args[0] = args[0].toLowerCase();
var kickee;
for(var i = 0; i < chan.users.length; i++) {
if(chan.users[i].name.toLowerCase() == args[0]) {
if(chan.users[i].name.toLowerCase() == args[0] &&
chan.getRank(chan.users[i].name) < user.rank) {
kickee = chan.users[i];
break;
}