19 Commits

Author SHA1 Message Date
Jon Atkins
e935902c49 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
2013-11-30 23:19:46 +00:00
Jon Atkins
b9c8e9c6c5 new reduced map data: first pass at loading the new format 2013-11-30 04:15:17 +00:00
Jon Atkins
1501f98f9b limit the number of player names resolved in one go, to prevent excessive requests
for #656 number 4
2013-11-24 01:04:45 +00:00
Jon Atkins
3e272a645c Merge pull request #573 from Xelio/hook-playerNameResolved
New hook: playerNameResolved
2013-10-28 10:45:53 -07:00
Jon Atkins
7a6bf1eeef only look to localStorage for our player guid WHEN WE'RE LOOKING UP OUR OWN NAME
daft error!
2013-10-07 20:18:09 +01:00
Jon Atkins
975db0ec7b add special case for name->guid lookup for our own name
IITC relies on this being available early, but the new sessionStorage for player name cache means it often isn't
(still, it's not perfect - as IITC still requires a lookup from guid->name for us to store the reverse mapping - this has always been a theoretical issue though)
likely fix for #577
2013-10-02 05:00:27 +01:00
Jon Atkins
7f9399bbeb ensuure we don't store 'null' in the name->guid cache object
(an alternative to #572)
2013-09-21 02:17:12 +01:00
Xelio
dfd91de6dc New hook: playerNameResolved
Called when unresolved player name get resolved. Argument is {names: object} which names[guid] is the resolved player name
2013-09-20 13:42:49 +08:00
Jon Atkins
37131aaf8e move player name cache from localStorage to sessionStorage
this gives a simple method of expiring entries. also, prevents localStorage from filling up with thousands of player names over time
(ideally something controllable with configurable age should be used, but this was a quick and simple change to try first)
2013-09-16 22:22:19 +01:00
Jon Atkins
7165acd30e add a function to query if a player guid is for a system special account (e.g. __ADA__ or __JARVIS__, possibly others in future too - NIAOPS?) 2013-09-16 21:33:17 +01:00
Jon Atkins
ab3bdcef30 don't treat names resolved from old chat messages as certain - only new ones
this prevents people having a name change from getting inconsistant results as old/new messages are seen
fix #393
2013-06-26 15:15:32 +01:00
Jon Atkins
751c2068fe add optional parameter sto allow chat code to specify it's uncertain if a name is right
needed for #393 (but not actually a fix)
2013-06-24 18:09:53 +01:00
Jon Atkins
372a2b34c8 don't resolve more than 15 names in one request - this is approximately the limit imposed by the server
if more are to be resolved, multiple requests are made. this does increase the odds of hitting the request rate limit, but in that case we'll get http failed requests and the names will be pushed back onto the pending resolve list for next time

fix #323
2013-05-27 03:19:51 +01:00
Jon Atkins
9a30c13413 cache reverse lookups from player name to guid - this prevents the potentially slow iteration throughout localStorage for every lookup 2013-05-19 03:50:47 +01:00
Xelio
5f94d56578 Add guid to window.PLAYER and add constant MAX_RESO_PER_PLAYER 2013-03-03 22:59:41 +08:00
Stefan Breunig
dcd00b83db add debugging output for sporadic issue #37 2013-02-15 16:56:01 +01:00
Stefan Breunig
8c7e63a7f8 don’t remove & re-render portals if nothing changed for them. 2013-02-10 20:50:31 +01:00
Stefan Breunig
25d6b4cdc5 preliminary chat support 2013-02-01 22:27:43 +01:00
Stefan Breunig
a07ee0cc3d so others may contribute 2013-02-01 13:11:14 +01:00