From 25e613678671c9ea1a08d2fc35321ae8cc84e418 Mon Sep 17 00:00:00 2001 From: elexis Date: Mon, 14 Dec 2015 04:14:58 +0000 Subject: [PATCH] Clear g_ChatTimers too in case the new /clear command is used from the session. Refs #3396. This was SVN commit r17467. --- binaries/data/mods/public/gui/common/functions_utility.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/binaries/data/mods/public/gui/common/functions_utility.js b/binaries/data/mods/public/gui/common/functions_utility.js index f8fa88687b..392848dc62 100644 --- a/binaries/data/mods/public/gui/common/functions_utility.js +++ b/binaries/data/mods/public/gui/common/functions_utility.js @@ -191,4 +191,11 @@ function clearChatMessages() { g_ChatMessages.length = 0; Engine.GetGUIObjectByName("chatText").caption = ""; + + try { + for (let timer of g_ChatTimers) + clearTimeout(timer); + g_ChatTimers.length = 0; + } catch (e) { + } }