From c98ad539d5fd8085ff934e5d262d13cfa6692b04 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 21 Jul 2021 15:21:58 +0200 Subject: [PATCH] Add message arg to /query Closes: https://todo.sr.ht/~emersion/gamja/94 --- commands.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/commands.js b/commands.js index 945fcf8..ce63e78 100644 --- a/commands.js +++ b/commands.js @@ -262,7 +262,7 @@ export default { }, }, "query": { - usage: "", + usage: " [message]", description: "Open a buffer to send messages to a nickname", execute: (app, args) => { let nick = args[0]; @@ -270,6 +270,11 @@ export default { throw new Error("Missing nickname"); } app.open(nick); + + if (args.length > 1) { + var text = args.slice(1).join(" "); + app.privmsg(nick, text); + } }, }, "quiet": {