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

Rewrite lockdown #249

Merged
merged 3 commits into from
Dec 16, 2024
Merged

Conversation

FloatingMilkshake
Copy link
Collaborator

Rewrites the lockdown helpers to make them more efficient. My old code for preserving overwrites was slow, inefficient and hard to read. Now lockdown is much faster, and you can actually understand what the code is doing!

Also resolves #241.

One thing I'm not sure about here is the return value for the lockdown helpers. Both LockChannelAsync and UnlockChannel return Task<bool>, and it looks like the bool is used only to indicate success when using the lockdown interaction commands. With the rewritten helpers there isn't a situation where this bool is ever false—should it just be removed? cc @Erisa.

@Erisa
Copy link
Owner

Erisa commented Dec 15, 2024

Yes you can remove the bool I suppose, any error case of this code would probably be thrown so the check for the bool in the interaction command should be changed to try/catch instead

@FloatingMilkshake FloatingMilkshake merged commit 50b1a0f into main Dec 16, 2024
2 checks passed
@FloatingMilkshake FloatingMilkshake deleted the floatingmilkshake/lockdown-rewrite branch December 16, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bug: Cliptok's lockdown failsafe for itself sometimes fails
2 participants