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:
Jon Atkins
2013-11-30 23:19:46 +00:00
parent d647e8786f
commit e935902c49
5 changed files with 15 additions and 100 deletions

View File

@ -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; // dont 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.
});
}