From d9ea64084df2c628fdf56b7344b834d34b2f4821 Mon Sep 17 00:00:00 2001 From: HoeenHero Date: Wed, 10 May 2017 21:13:18 -0400 Subject: [PATCH] Add |notify| (#873) --- js/client-chat.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/client-chat.js b/js/client-chat.js index 787257c74..ba1be831c 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -1253,6 +1253,13 @@ this.$chat.append('
' + Tools.sanitizeHTML(row.slice(1).join('|')) + '
'); break; + case 'notify': + if (!Tools.prefs('mute') && Tools.prefs('notifvolume')) { + soundManager.getSoundById('notif').setVolume(Tools.prefs('notifvolume')).play(); + } + this.notifyOnce(row[1], row.slice(2).join('|'), 'highlight'); + break; + case 'error': this.$chat.append('
' + Tools.escapeHTML(row.slice(1).join('|')) + '
'); break;