mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-15 00:47:46 +01:00
Implement /topic command
This commit is contained in:
parent
44b1f28cb6
commit
5cb38a9830
@ -526,6 +526,18 @@ export default class App extends Component {
|
|||||||
}
|
}
|
||||||
this.switchBuffer(name);
|
this.switchBuffer(name);
|
||||||
break;
|
break;
|
||||||
|
case "topic":
|
||||||
|
var channel = this.state.activeBuffer;
|
||||||
|
if (!channel || !this.isChannel(channel)) {
|
||||||
|
console.error("Not in a channel");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var params = [channel];
|
||||||
|
if (args.length > 0) {
|
||||||
|
params.push(args.join(" "));
|
||||||
|
}
|
||||||
|
this.client.send({ command: "TOPIC", params });
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.error("Unknwon command '" + cmd + "'");
|
console.error("Unknwon command '" + cmd + "'");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user