diff --git a/commands.js b/commands.js index 5359f69..ba6b4c6 100644 --- a/commands.js +++ b/commands.js @@ -1,3 +1,4 @@ +import * as irc from "../lib/irc.js"; import { SERVER_BUFFER, BufferType } from "./state.js"; function getActiveClient(app) { @@ -151,6 +152,19 @@ export default { app.close({ name: SERVER_BUFFER }); }, }, + "quote": { + usage: "", + description: "Send a raw IRC command to the server", + execute: (app, args) => { + var msg; + try { + msg = irc.parseMessage(args.join(" ")); + } catch (err) { + throw new Error("failed to parse IRC command: " + err.message); + } + getActiveClient(app).send(msg); + }, + }, "reconnect": { description: "Reconnect to the server", execute: (app, args) => {