mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-06 14:29:38 +00:00
Minor improvements to socket.io chat, including banning and unbanning per room, and spam detection and server bans
This commit is contained in:
@ -36,6 +36,24 @@
|
||||
else if(m.startsWith('/list')){
|
||||
socket.emit('LIST', {room: room});
|
||||
}
|
||||
else if(m.startsWith('/banlist')){
|
||||
socket.emit('LISTBAN', {
|
||||
room: room,
|
||||
});
|
||||
}
|
||||
else if(m.startsWith('/ban')){
|
||||
socket.emit('BAN', {
|
||||
room: room,
|
||||
nick: m.split(' ')[1],
|
||||
time: (1 * m.split(' ')[2])
|
||||
});
|
||||
}
|
||||
else if(m.startsWith('/unban')){
|
||||
socket.emit('UNBAN', {
|
||||
room: room,
|
||||
ip: m.split(' ')[1]
|
||||
});
|
||||
}
|
||||
else socket.emit('MSG', {room: room, msg: m});
|
||||
document.getElementById('m').value = '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user