Ticket #3281: t3281_fix_highlighted_playername_regex.patch

File t3281_fix_highlighted_playername_regex.patch, 756 bytes (added by elexis, 9 years ago)
  • binaries/data/mods/public/gui/lobby/lobby.js

     
    830830    if (!msg.datetime)
    831831        msg.datetime = null;
    832832
    833833    // Highlight local user's nick
    834834    if (msg.text.indexOf(g_Name) != -1 && g_Name != msg.from)
    835         msg.text = msg.text.replace(new RegExp('\\b' + '\\' + g_Name + '\\b', "g"), colorPlayerName(g_Name));
     835        msg.text = msg.text.replace(new RegExp('\\b' + g_Name + '\\b', "g"), colorPlayerName(g_Name));
    836836
    837837    // Run spam test if it's not a historical message
    838838    if (!msg.datetime)
    839839        updateSpamMonitor(msg.from);
    840840    if (isSpam(msg.text, msg.from))