Added channel-kicks. added up disconnect message
This commit is contained in:
parent
796bb033a7
commit
5c30508e96
5 changed files with 30 additions and 5 deletions
|
|
@ -43,6 +43,14 @@ class channel{
|
|||
document.title = `${this.channelName} - Connected`
|
||||
});
|
||||
|
||||
this.socket.on("kick", (data) => {
|
||||
if(data.type == "kick"){
|
||||
window.alert(`You have been kicked from the channel for the following reason:\n\n${data.reason}`);
|
||||
}else{
|
||||
window.alert(`You have been disconnceted from the channel by the server!\nType: ${data.type}\nReason: ${data.reason}`);
|
||||
}
|
||||
});
|
||||
|
||||
this.socket.on("clientMetadata", this.handleClientInfo.bind(this));
|
||||
|
||||
this.socket.on("error", console.log);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue