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:
parent
713f00f99f
commit
fb234bbaa7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user