From 5cb38a9830dc7aa0184fdcf7371d6d2d269c9860 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 9 Jul 2020 17:36:28 +0200 Subject: [PATCH] Implement /topic command --- components/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/app.js b/components/app.js index 4a659f2..0087a3e 100644 --- a/components/app.js +++ b/components/app.js @@ -526,6 +526,18 @@ export default class App extends Component { } this.switchBuffer(name); 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: console.error("Unknwon command '" + cmd + "'"); }