Showing the hostmessage only if its not empty (https://github.com/TeaSpeak/TeaClient/issues/22)

This commit is contained in:
WolverinDEV 2020-04-11 10:57:52 +02:00
parent 84face7e3b
commit 323b4e7006
2 changed files with 13 additions and 8 deletions

View file

@ -1,4 +1,7 @@
# Changelog: # Changelog:
* **11.03.20**
- Only show the host message when its not empty
* **10.03.20** * **10.03.20**
- Improved key code displaying - Improved key code displaying
- Added a keymap system (Hotkeys) - Added a keymap system (Hotkeys)

View file

@ -208,16 +208,18 @@ export class ConnectionCommandHandler extends AbstractCommandHandler {
if(properties.virtualserver_hostmessage_mode > 0) { if(properties.virtualserver_hostmessage_mode > 0) {
if(properties.virtualserver_hostmessage_mode == 1) { if(properties.virtualserver_hostmessage_mode == 1) {
/* show in log */ /* show in log */
this.connection_handler.log.log(server_log.Type.SERVER_HOST_MESSAGE, { if(properties.virtualserver_hostmessage)
message: properties.virtualserver_hostmessage this.connection_handler.log.log(server_log.Type.SERVER_HOST_MESSAGE, {
}); message: properties.virtualserver_hostmessage
});
} else { } else {
/* create modal/create modal and quit */ /* create modal/create modal and quit */
createModal({ if(properties.virtualserver_hostmessage || properties.virtualserver_hostmessage_mode == 3)
header: tr("Host message"), createModal({
body: bbcode_chat(properties.virtualserver_hostmessage), header: tr("Host message"),
footer: undefined body: bbcode_chat(properties.virtualserver_hostmessage),
}).open(); footer: undefined
}).open();
if(properties.virtualserver_hostmessage_mode == 3) { if(properties.virtualserver_hostmessage_mode == 3) {
/* first let the client initialize his stuff */ /* first let the client initialize his stuff */