Skip to content

Commit

Permalink
update disconnect packet
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Aug 18, 2024
1 parent a797201 commit 4c3f625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ class Client extends Connection {
if (this.status === ClientStatus.Disconnected) return
this.write('disconnect', {
hide_disconnect_screen: hide,
message: reason
message: reason,
filtered_message: ''
})
this.close(reason)
}
Expand Down
3 changes: 2 additions & 1 deletion src/serverPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ class Player extends Connection {
if (this.status === ClientStatus.Disconnected) return
this.write('disconnect', {
hide_disconnect_screen: hide,
message: reason
message: reason,
filtered_message: ''
})
this.server.conLog('Kicked ', this.connection?.address, reason)
setTimeout(() => this.close('kick'), 100) // Allow time for message to be recieved.
Expand Down

0 comments on commit 4c3f625

Please sign in to comment.