aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/core/invite.js
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-02-02 22:34:06 +0100
committermarzavec <admin@marzavec.com>2019-02-02 22:34:06 +0100
commit02f6fbf70153241ce45b9c880664566f2d1ede86 (patch)
tree27f9bfbfd572342dc7c559088ad155bbf0d9d0ee /server/src/commands/core/invite.js
parentMerge pull request #51 from MinusGix/patch-2 (diff)
downloadhackchat-02f6fbf70153241ce45b9c880664566f2d1ede86.tar.gz
hackchat-02f6fbf70153241ce45b9c880664566f2d1ede86.zip
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.
Diffstat (limited to 'server/src/commands/core/invite.js')
-rw-r--r--server/src/commands/core/invite.js9
1 files changed, 8 insertions, 1 deletions
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);