mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-05 09:35:57 +00:00
Add full support for multiple connections with one account in Socket.IO
Add LIST command
This commit is contained in:
@ -33,6 +33,9 @@
|
||||
else if(m.startsWith('/kick')){
|
||||
socket.emit('KICK', {nick: m.split(' ')[1], room: room});
|
||||
}
|
||||
else if(m.startsWith('/list')){
|
||||
socket.emit('LIST', {room: room});
|
||||
}
|
||||
else socket.emit('MSG', {room: room, msg: m});
|
||||
document.getElementById('m').value = '';
|
||||
}
|
||||
@ -52,6 +55,10 @@
|
||||
document.getElementById('messages').innerHTML+='<li><i>'+data.nick+' has left the chat</i></li>';
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
});
|
||||
socket.on('LIST', function(data){
|
||||
document.getElementById('messages').innerHTML+='<li><i>'+data+'</i></li>';
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
});
|
||||
function getUrlParameter(name) {
|
||||
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||||
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
||||
|
Reference in New Issue
Block a user