From ca3ad182174581ddd88b2cfb09216526a4499d50 Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 13 Dec 2013 17:54:25 +0100 Subject: [PATCH] Repair compact tab --- code/chat.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/chat.js b/code/chat.js index 2bcf5f79..50cb8fec 100644 --- a/code/chat.js +++ b/code/chat.js @@ -228,12 +228,12 @@ window.chat.renderCompact = function(oldMsgsWereAdded) { $.each(chat._public.data, function(guid, entry) { // skip player msgs if(!entry[1]) return true; - var pguid = entry[3]; + var nick = entry[3]; // ignore if player has newer data - if(data[pguid] && data[pguid][0] > entry[0]) return true; - data[pguid] = entry; + if(data[nick] && data[nick][0] > entry[0]) return true; + 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. chat.renderData(data, 'chatcompact', oldMsgsWereAdded); } @@ -350,7 +350,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is // 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]; }); }