From 5f30662fc0361d8304c2100ef7834b7239bcdb22 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 25 Jun 2020 21:47:31 +0200 Subject: [PATCH] Implement /buffer --- components/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/app.js b/components/app.js index 500b935..c5308f7 100644 --- a/components/app.js +++ b/components/app.js @@ -397,6 +397,14 @@ export default class App extends Component { var newNick = args[0]; this.client.send({ command: "NICK", params: [newNick] }); break; + case "buffer": + var name = args[0]; + if (!this.state.buffers.has(name)) { + console.error("Unknown buffer"); + return; + } + this.switchBuffer(name); + break; default: console.error("Unknwon command '" + cmd + "'"); }