Add message arg to /query

Closes: https://todo.sr.ht/~emersion/gamja/94
This commit is contained in:
Simon Ser 2021-07-21 15:21:58 +02:00
parent 51883292f9
commit c98ad539d5

View file

@ -262,7 +262,7 @@ export default {
}, },
}, },
"query": { "query": {
usage: "<nick>", usage: "<nick> [message]",
description: "Open a buffer to send messages to a nickname", description: "Open a buffer to send messages to a nickname",
execute: (app, args) => { execute: (app, args) => {
let nick = args[0]; let nick = args[0];
@ -270,6 +270,11 @@ export default {
throw new Error("Missing nickname"); throw new Error("Missing nickname");
} }
app.open(nick); app.open(nick);
if (args.length > 1) {
var text = args.slice(1).join(" ");
app.privmsg(nick, text);
}
}, },
}, },
"quiet": { "quiet": {