Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] decay system within 1 hour if no wh information is entered #752

Closed
Solid-State-Society opened this issue Feb 17, 2019 · 9 comments
Assignees
Milestone

Comments

@Solid-State-Society
Copy link

To auto purge incorrect connections by jumpcloning or tollgating, how about implementing a function that deletes any system within one hour if no user has entered the corresponding wh information in said system?

@Sakata-MC
Copy link

Better solution would be to detect if player is in pod and don't create new systems or connections if they're in a pod. Would also remove the issue of podding/self-destructing causing the same problem as well.

@Solid-State-Society
Copy link
Author

that would not address toll gates, unfortunately

@exodus4d
Copy link
Owner

@Solid-State-Society Thanks for your suggestion! Could you describe what you mean with "tollgating" please?
@Sakata-MC Connections created in case of podding should now be fixed:

  • New ESI API endpoint for Clones added
  • Characters home clone location (structure/station) now stored to character data on login
  • New connection will not get added if a "pod jump" is detected:
    1. Current shipType == capsule
    2. Current character location (structure/station) matches home clone location
    3. Jump distance between systems > 1

There is just one case, where the new logic will fail:

  • Character is in a capsule, sitting in a wh that leads directly to your home clone system. And you manage to jump into the systems, warp to your home clone structure/station and dock within < 5s.

@exodus4d exodus4d added this to the v1.5.1 milestone Apr 19, 2019
@exodus4d exodus4d self-assigned this Apr 19, 2019
@Solid-State-Society
Copy link
Author

Solid-State-Society commented Apr 19, 2019 via email

@exodus4d exodus4d mentioned this issue May 7, 2019
@tralafiti
Copy link
Contributor

Is it possible that this issue was reintroduced? We see connections to Jita after someone podded himself on our maps on a daily basis. The capsule itself doesn't seem to trigger it, but as soon as you board a ship in Jita a connection is created. Could it be related to the addition of the jump history feature?

@exodus4d
Copy link
Owner

exodus4d commented Mar 7, 2020

@tralafiti indeed, the jump history is most likely the issue. Are you able to test two code versions that might fix it under "real life" conditions? - Just temporary change a few code lines, and give me feedback if there is no new connection made after pod kill + ship change in clone location?


Version A:

Fail-Safe version, flushes jump history after podding detected. (downside of this is, that jump history disappears from UI)
Replace this...

if(!$route['routePossible']){
$addConnection = false;
}

... with...

if(!$route['routePossible']){
    $character->clearCacheDataWithPrefix(Pathfinder\CharacterModel::DATA_CACHE_KEY_LOG_HISTORY);
    $addConnection = false;
}

Version B:

More elegant but higher complexity - needs more testing. We break out of the loop that iterates over all historic jumps and looks for the last relevant history entry.
Replace this...

if(!empty((array)$historyEntry['mapIds'])){ // if $historyEntry was already checked by ANY other map -> no further checks
$skipRest = true;
}

... with... (add new if below the existing)

if(!empty((array)$historyEntry['mapIds'])){
    $skipRest = true;
}

if(
    !$skipRest &&
    (
        'station' == $this->cloneLocationType &&
        $this->cloneLocationId == (int)$historyEntry['log']['station']['id']
    ) || (
        'structure' == $this->cloneLocationType &&
        $this->cloneLocationId == (int)$historyEntry['log']['structure']['id']
    )
){
    $skipRest = true;
}

@tralafiti
Copy link
Contributor

@exodus4d Version B is active on our server now, will give you feedback in a few days. Thanks!

@tralafiti
Copy link
Contributor

We are still seeing connections being created when someone is podded. Usually when the podded pilot leaves the station, doesn't seem to matter if he's in a ship or still in his pod

@exodus4d
Copy link
Owner

OK, thanks for feedback. I think I don´t get around making some extensive testing for this issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants