From 02f6fbf70153241ce45b9c880664566f2d1ede86 Mon Sep 17 00:00:00 2001 From: marzavec Date: Sat, 2 Feb 2019 13:34:06 -0800 Subject: Minor module changes Added trips to listusers output. Added 'reason' to reload broadcast. Fixed removemod bug. Added /nick hook to changenick. Added 'type' and 'from' fields to invite event. --- server/src/commands/core/invite.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'server/src/commands/core/invite.js') diff --git a/server/src/commands/core/invite.js b/server/src/commands/core/invite.js index f44779b..8374309 100644 --- a/server/src/commands/core/invite.js +++ b/server/src/commands/core/invite.js @@ -31,11 +31,16 @@ exports.run = async (core, server, socket, data) => { // build and send invite let payload = { cmd: 'info', + type: 'invite', + from: socket.nick, invite: channel, text: `${socket.nick} invited you to ?${channel}` }; - let inviteSent = server.broadcast( payload, { channel: socket.channel, nick: data.nick }); + let inviteSent = server.broadcast( payload, { + channel: socket.channel, + nick: data.nick + }); // server indicates the user was not found if (!inviteSent) { @@ -48,6 +53,8 @@ exports.run = async (core, server, socket, data) => { // reply with common channel server.reply({ cmd: 'info', + type: 'invite', + invite: channel, text: `You invited ${data.nick} to ?${channel}` }, socket); -- cgit v1.2.1