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

19 lines
486 B
JavaScript
Raw Normal View History

2018-04-28 22:29:38 -07:00
/*
Description: This module will be directly called by the server event handler
when a socket connection is closed or lost. It can calso be called
by a client to have the connection severed.
*/
exports.run = async (core, server, socket, data) => {
if (socket.channel) {
server.broadcast({
cmd: 'onlineRemove',
nick: socket.nick
}, { channel: socket.channel });
}
socket.terminate();
};
2018-05-12 14:13:12 +05:30
exports.info = { name: 'disconnect' };