Handle timeout left reason

This commit is contained in:
WolverinDEV 2019-06-19 22:11:22 +02:00
parent 44ab896901
commit c5a9f266fd
2 changed files with 9 additions and 0 deletions

View file

@ -441,6 +441,14 @@ namespace connection {
if(channel_from == own_channel)
this.connection_handler.sound.play(Sound.USER_LEFT_BANNED);
} else if(reason_id == ViewReasonId.VREASON_TIMEOUT) {
this.connection_handler.chat.serverChat().appendError(tr("{0} timed out ({1})"),
client.createChatTag(true),
entry["reasonmsg"] ? " (" + entry["reasonmsg"] + ")" : ""
);
if(channel_from == own_channel)
this.connection_handler.sound.play(Sound.USER_LEFT_TIMEOUT);
} else {
console.error(tr("Unknown client left reason!"));
}

View file

@ -40,6 +40,7 @@ enum Sound {
USER_LEFT_KICKED_SERVER = "user.left.kicked.channel", //User is your channel was kicked from the server
USER_LEFT_DISCONNECT = "user.left.disconnect",
USER_LEFT_BANNED = "user.left.banned",
USER_LEFT_TIMEOUT = "user.left.timeout",
ERROR_INSUFFICIENT_PERMISSIONS = "error.insufficient_permissions",