diff options
author | Joe Robinson <joe@lc8n.com> | 2016-10-16 21:41:00 +0100 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2016-10-16 21:41:00 +0100 |
commit | e0840642f1710a5f50d3508d3fe661fdc17d9d56 (patch) | |
tree | 327f25dcd00dab2c7c77b169a12234ac0897ff6e /commands.js | |
parent | bf695e6ad13b0fd0fb2706d6bf9960a66e656696 (diff) |
Add kick handler
Diffstat (limited to 'commands.js')
-rw-r--r-- | commands.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands.js b/commands.js index 59be364..138c55f 100644 --- a/commands.js +++ b/commands.js @@ -67,10 +67,11 @@ module.exports.joinChannel = function (channel, sendJoin) { } module.exports.removeChannel = function(channel, sendPart) { - var channelObj = client.channel(channel) + chanId = $("[data-tab='"+channel+"'].chat").attr("data-id"); $("[data-tab='"+channel+"']").remove(); if (sendPart) { + var channelObj = client.channel(channel) channelObj.part(); } while ($("[data-id="+(chanId-1)+"]").length == 0 && chanId >=0) { |