From 1c2728c9f8520b2932fa5304619da1b20850ac5d Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Mon, 27 May 2013 00:45:08 -0400 Subject: [PATCH] Permissions check for /kick --- chatcommand.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chatcommand.js b/chatcommand.js index d49a2a96..a134574a 100644 --- a/chatcommand.js +++ b/chatcommand.js @@ -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; }