update disconnect packet

This commit is contained in:
extremeheat 2024-08-17 20:03:02 -04:00 committed by GitHub
commit 4c3f62567e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -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)
}

View file

@ -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.