add highlight to SYSTEM_NARROWCAST (your X on Y was destroyed by Z) messages
This commit is contained in:
parent
1d55fc5d31
commit
a2a9d3458d
@ -315,7 +315,7 @@ window.chat.writeDataToHash = function(newData, storageHash, skipSecureMsgs) {
|
|||||||
if(skipThisEntry) return true;
|
if(skipThisEntry) return true;
|
||||||
|
|
||||||
// format: timestamp, autogenerated, HTML message, player guid
|
// format: timestamp, autogenerated, HTML message, player guid
|
||||||
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer), pguid];
|
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast), pguid];
|
||||||
|
|
||||||
window.setPlayerName(pguid, nick); // free nick name resolves
|
window.setPlayerName(pguid, nick); // free nick name resolves
|
||||||
});
|
});
|
||||||
@ -365,7 +365,7 @@ window.chat.renderDivider = function(text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
window.chat.renderMsg = function(msg, nick, time, team, msgToPlayer) {
|
window.chat.renderMsg = function(msg, nick, time, team, msgToPlayer, systemNarrowcast) {
|
||||||
var ta = unixTimeToHHmm(time);
|
var ta = unixTimeToHHmm(time);
|
||||||
var tb = unixTimeToString(time, true);
|
var tb = unixTimeToString(time, true);
|
||||||
// help cursor via “#chat time”
|
// help cursor via “#chat time”
|
||||||
@ -374,6 +374,10 @@ window.chat.renderMsg = function(msg, nick, time, team, msgToPlayer) {
|
|||||||
{
|
{
|
||||||
t = '<div class="pl_nudge_date">' + t + '</div><div class="pl_nudge_pointy_spacer"></div>';
|
t = '<div class="pl_nudge_date">' + t + '</div><div class="pl_nudge_pointy_spacer"></div>';
|
||||||
}
|
}
|
||||||
|
if (systemNarrowcast)
|
||||||
|
{
|
||||||
|
msg = '<div class="system_narrowcast">' + msg + '</div>';
|
||||||
|
}
|
||||||
var s = 'style="cursor:pointer; color:'+COLORS[team]+'"';
|
var s = 'style="cursor:pointer; color:'+COLORS[team]+'"';
|
||||||
var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : '';
|
var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : '';
|
||||||
var i = ['<span class="invisep"><</span>', '<span class="invisep">></span>'];
|
var i = ['<span class="invisep"><</span>', '<span class="invisep">></span>'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user