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

Allow rollback of actions server-wide #299

Open
2 tasks done
TCAtrevor opened this issue Jan 10, 2025 · 4 comments
Open
2 tasks done

Allow rollback of actions server-wide #299

TCAtrevor opened this issue Jan 10, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@TCAtrevor
Copy link

Is your feature request related to a problem?

I wanted to rollback every action from a single player from the last seven hours, only to find that the rollback command required a "range" parameter that is arbitrarily capped to 100.

Describe the solution you'd like.

The rollback command should allow execution without the range parameter, or allow the range parameter to be unlimited, such as:

/ledger rollback source:PlayerName after:7h

Describe alternatives you've considered.

I haven't tried any alternatives.

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I have ensured the feature I'm requesting isn't already in the latest supported mod version.

Other

I am running commands from the server console and have no idea what "range" even does in that context. Range from 0,0 certainly won't be helpful, assuming that's what it would be. The documentation is also very sparse on information, like if range is measured in blocks or chunks, and the cap of 100 also goes completely unmentioned.

@TCAtrevor TCAtrevor added the enhancement New feature or request label Jan 10, 2025
@DrexHD
Copy link
Contributor

DrexHD commented Jan 10, 2025

You can increase the maximum search range in the config: https://www.quiltservertools.net/Ledger/latest/config/#search-settings, see maxRange. This is a safety measurement against accidental incorrect command execution. You can increase the maxRange in the config and specify that custom range instead to replicate a global range if you are confident that you will never run incorrect commands.

Range is measured in blocks and the console context is at 0, 0.

We could add something like allowing maxRange to be set to -1 or something and not force a range.

@TCAtrevor
Copy link
Author

Oh, I didn't even realize until now that this is actually a regression from #277. There's even a comment on that PR stating almost exactly what I want here, but went totally ignored.

@TCAtrevor
Copy link
Author

Thank you for the comment though, that will be very helpful for the current version. My config file was generated before that change was made so I had no idea of that option before opening this issue.

DrexHD added a commit that referenced this issue Jan 10, 2025
DrexHD added a commit that referenced this issue Jan 10, 2025
@Syntaxvgm
Copy link

Syntaxvgm commented Jan 14, 2025

I just want to point out how absolutely necessary this is for the workflow of people, and despite finding out there is a max range config option added but not in the example config in the documentation, it's still wildly inconvenient to not have a global option. new player joins, is an idiot, want to quickly see everything they did after getting rid of them. Just made that multiple searches or more complex ones with multiple dimensions. Also ranged searches are slower than all searches I've noticed.

I frequently will pull a global search, see what there is first, then global rollback of new players that got banned. I don't even understand the purpose of adding max range without adding a global option. Anyone who doesn't understand what kind of search or rollback they're performing shouldn't have access to ledger on your server in the first place.

Thanks for the PR drex.

Edit
Perhaps a better 'safety' feature would be a toggle and configurable range warning for searches and rollbacks, with separate warning ranges, requiring the user to confirm their large search/rollback, or similar settings with a permission node to do large ranges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants