Add reason arg to /part
This commit is contained in:
@@ -428,13 +428,17 @@ export default class App extends Component {
|
|||||||
this.client.send({ command: "JOIN", params: [channel] });
|
this.client.send({ command: "JOIN", params: [channel] });
|
||||||
break;
|
break;
|
||||||
case "part":
|
case "part":
|
||||||
// TODO: part reason
|
var reason = args.join(" ");
|
||||||
if (!this.state.activeBuffer || !this.isChannel(this.state.activeBuffer)) {
|
var channel = this.state.activeBuffer;
|
||||||
|
if (!channel || !this.isChannel(channel)) {
|
||||||
console.error("Not in a channel");
|
console.error("Not in a channel");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var channel = this.state.activeBuffer;
|
var params = [channel];
|
||||||
this.client.send({ command: "PART", params: [channel] });
|
if (reason) {
|
||||||
|
params.push(reason);
|
||||||
|
}
|
||||||
|
this.client.send({ command: "PART", params });
|
||||||
break;
|
break;
|
||||||
case "msg":
|
case "msg":
|
||||||
var target = args[0];
|
var target = args[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user