mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-12-08 17:22:19 +00:00
Ignore empty messages in socket.io
This commit is contained in:
@@ -182,6 +182,7 @@ async function init(satyr: any, port: number, ircconf: any){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
socket.on('MSG', (data) => {
|
socket.on('MSG', (data) => {
|
||||||
|
if(data.msg === "") return;
|
||||||
io.to(data.room).emit('MSG', {nick: socket.nick, msg: data.msg});
|
io.to(data.room).emit('MSG', {nick: socket.nick, msg: data.msg});
|
||||||
if(ircconf.enable) irc.send(socket.nick, data.room, data.msg);
|
if(ircconf.enable) irc.send(socket.nick, data.room, data.msg);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user