misc fixes - some untested
- no GUIDs in chat for players or portal details - so remove player GUID related functions - remove player guid code from COMM - update portal_info functions to compare to player name rather than guid
This commit is contained in:
10
code/chat.js
10
code/chat.js
@ -284,11 +284,9 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
|
||||
switch(markup[0]) {
|
||||
case 'SENDER': // user generated messages
|
||||
nick = markup[1].plain.slice(0, -2); // cut “: ” at end
|
||||
pguid = markup[1].guid;
|
||||
break;
|
||||
|
||||
case 'PLAYER': // automatically generated messages
|
||||
pguid = markup[1].guid;
|
||||
nick = markup[1].plain;
|
||||
team = markup[1].team === 'RESISTANCE' ? TEAM_RES : TEAM_ENL;
|
||||
if(ind > 0) msg += nick; // don’t repeat nick directly
|
||||
@ -351,13 +349,9 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
|
||||
if ((!isPublicChannel) && (!isSecureMessage)) msg = '<span style="color: #ff6">[public]</span> ' + msg;
|
||||
|
||||
|
||||
// format: timestamp, autogenerated, HTML message, player guid
|
||||
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast), pguid];
|
||||
// format: timestamp, autogenerated, HTML message
|
||||
storageHash.data[json[0]] = [json[1], auto, chat.renderMsg(msg, nick, time, team, msgToPlayer, systemNarrowcast)];
|
||||
|
||||
// if we're processing older messages, we could be looking at pre-name change mentions or similar
|
||||
// so in that case, flag it so we don't overwrite existing name cache entries.
|
||||
// (it's not perfect - the initial request has the wrong value here)
|
||||
window.setPlayerName(pguid, nick, isOlderMsgs); // free nick name resolves.
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user