fix previous commit

This commit is contained in:
Evert Prants 2016-09-24 19:14:12 +03:00
parent d118c08aee
commit 23d732902f

View File

@ -524,7 +524,7 @@ class Tab {
setTitle(title) { setTitle(title) {
let titleEl = this.element.querySelector('#title'); let titleEl = this.element.querySelector('#title');
if(!titleEl) if(titleEl)
titleEl.innerHTML = title; titleEl.innerHTML = title;
} }
@ -777,8 +777,7 @@ class InputHandler {
break; break;
case "part": case "part":
if (!listargs[1] && buf.type == "channel") { if (!listargs[1] && buf.type == "channel") {
inpcommand = "part"; irc.socket.emit("userinput", {command: "part", server: buf.server, message: "", arguments: [buf.name]});
listargs = [buf.name];
} else if(buf.type != "channel") { } else if(buf.type != "channel") {
this.commandError(buf, listargs[0].toUpperCase()+': Buffer is not a channel.'); this.commandError(buf, listargs[0].toUpperCase()+': Buffer is not a channel.');
} else if(listargs[1]) { } else if(listargs[1]) {
@ -786,7 +785,7 @@ class InputHandler {
let msg = ""; let msg = "";
if(listargs[2]) if(listargs[2])
msg = listargs.slice(2).join(" "); 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 { } else {
if(buf.type == "channel") { if(buf.type == "channel") {
irc.socket.emit("userinput", {command: "part", server: buf.server, message: listargs.slice(1).join(" "), arguments: [buf.name]}); irc.socket.emit("userinput", {command: "part", server: buf.server, message: listargs.slice(1).join(" "), arguments: [buf.name]});