Fixed incorrect handling of idle kicks

This commit is contained in:
WolverinDEV 2019-10-24 17:56:11 +02:00
parent 2b97241b39
commit 8a488ff98a

View file

@ -464,7 +464,7 @@ namespace connection {
}
handleCommandClientLeftView(json) {
let reason_id;
let reason_id = -1;
for(const entry of json) {
reason_id = entry["reasonid"] || reason_id;
@ -515,7 +515,7 @@ namespace connection {
} else if(reason_id == ViewReasonId.VREASON_SERVER_LEFT) {
if(channel_from == own_channel)
this.connection_handler.sound.play(Sound.USER_LEFT_DISCONNECT);
} else if(json["reasonid"] == ViewReasonId.VREASON_SERVER_KICK) {
} else if(reason_id == ViewReasonId.VREASON_SERVER_KICK) {
if(channel_from == own_channel)
this.connection_handler.sound.play(Sound.USER_LEFT_KICKED_SERVER);
} else if(reason_id == ViewReasonId.VREASON_CHANNEL_KICK) {