1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00

Make ban command broadcast information about user and banner

This commit is contained in:
MinusGix 2020-03-16 10:29:42 -05:00
parent 713f00f99f
commit fb234bbaa7

View File

@ -46,12 +46,16 @@ export async function run(core, server, socket, data) {
server.broadcast({
cmd: 'info',
text: `Banned ${targetNick}`,
user: UAC.getUserDetails(badClient),
}, { channel: socket.channel, level: (level) => level < UAC.levels.moderator });
// notify mods
server.broadcast({
cmd: 'info',
text: `${socket.nick}#${socket.trip} banned ${targetNick} in ${socket.channel}, userhash: ${badClient.hash}`,
channel: socket.channel,
user: UAC.getUserDetails(badClient),
banner: UAC.getUserDetails(socket),
}, { level: UAC.isModerator });
// force connection closed