From 23d732902fb4185622065fd93f952aa8629683ba Mon Sep 17 00:00:00 2001 From: Evert Date: Sat, 24 Sep 2016 19:14:12 +0300 Subject: [PATCH] fix previous commit --- public/js/main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index b578e7a..a50a712 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -524,7 +524,7 @@ class Tab { setTitle(title) { let titleEl = this.element.querySelector('#title'); - if(!titleEl) + if(titleEl) titleEl.innerHTML = title; } @@ -777,8 +777,7 @@ class InputHandler { break; case "part": if (!listargs[1] && buf.type == "channel") { - inpcommand = "part"; - listargs = [buf.name]; + irc.socket.emit("userinput", {command: "part", server: buf.server, message: "", arguments: [buf.name]}); } else if(buf.type != "channel") { this.commandError(buf, listargs[0].toUpperCase()+': Buffer is not a channel.'); } else if(listargs[1]) { @@ -786,7 +785,7 @@ class InputHandler { let msg = ""; if(listargs[2]) msg = listargs.slice(2).join(" "); - irc.socket.emit("userinput", {command: "part", server: buf.server, message: msg, arguments: [buf.name]}); + irc.socket.emit("userinput", {command: "part", server: buf.server, message: msg, arguments: [listargs[1]]}); } else { if(buf.type == "channel") { irc.socket.emit("userinput", {command: "part", server: buf.server, message: listargs.slice(1).join(" "), arguments: [buf.name]});