Ticket #3281: 3281.diff

File 3281.diff, 665 bytes (added by Stan, 9 years ago)

Working version that just replace the name ​http://imgur.com/FvE7rTm Proof.

  • binaries/data/mods/public/gui/lobby/lobby.js

     
    849849        msg.datetime = null;
    850850
    851851    // Highlight local user's nick
    852     if (msg.text.indexOf(g_Name) != -1 && g_Name != msg.from)
    853         msg.text = msg.text.replace(new RegExp('\\b' + '\\' + g_Name + '\\b', "g"), colorPlayerName(g_Name));
     852    if (g_Name != msg.from)
     853        msg.text = msg.text.replace(g_Name, colorPlayerName(g_Name));
    854854
    855855    // Run spam test if it's not a historical message
    856856    if (!msg.datetime)