commit
fba399fa76
10
code/chat.js
10
code/chat.js
@ -228,12 +228,12 @@ window.chat.renderCompact = function(oldMsgsWereAdded) {
|
|||||||
$.each(chat._public.data, function(guid, entry) {
|
$.each(chat._public.data, function(guid, entry) {
|
||||||
// skip player msgs
|
// skip player msgs
|
||||||
if(!entry[1]) return true;
|
if(!entry[1]) return true;
|
||||||
var pguid = entry[3];
|
var nick = entry[3];
|
||||||
// ignore if player has newer data
|
// ignore if player has newer data
|
||||||
if(data[pguid] && data[pguid][0] > entry[0]) return true;
|
if(data[nick] && data[nick][0] > entry[0]) return true;
|
||||||
data[pguid] = entry;
|
data[nick] = entry;
|
||||||
});
|
});
|
||||||
// data keys are now player guids instead of message guids. However,
|
// data keys are now player nicks instead of message guids. However,
|
||||||
// it is all the same to renderData.
|
// it is all the same to renderData.
|
||||||
chat.renderData(data, 'chatcompact', oldMsgsWereAdded);
|
chat.renderData(data, 'chatcompact', oldMsgsWereAdded);
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
|
|||||||
|
|
||||||
|
|
||||||
// format: timestamp, autogenerated, HTML message
|
// format: timestamp, autogenerated, HTML message
|
||||||
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast)];
|
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast), nick];
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user