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

Extend oper:override for +f oper requirement #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

supertassu
Copy link
Contributor

@supertassu supertassu commented Feb 1, 2021

closes #61

@edk0
Copy link
Contributor

edk0 commented Feb 1, 2021

Thanks for working on that issue! I think we'd ideally like to solve this more generally, by making the core mechanisms here more extensible so that the logic of this change can go in the override extension.

I think that'd boil down to calling get_channel_access unconditionally everywhere it's currently gated on membership and, in check_forward specifically, calling it with a "direction" other than MODE_QUERY, as that's (ab)used to signal that we're not making changes. If you don't do anything else, extensions/override will already implement the desired behaviour, as well as allow overriding anything else from outside channels. I think that's fine, but it might merit wider discussion.

What that won't do is report setting +f where the overriding oper has ops in the source channel but not the target, and I think that's worth having. For that we'd need to create a new hook (along the lines of can_kick). We could call that from check_forward and hook it in extensions/override to emit the usual override spam; again copying how it deals with kicks seems a good starting point.

I'd be happy to step through things over IRC if you're not sure about any of this.

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

Successfully merging this pull request may close these issues.

Extend oper:override to cover cmode +f
2 participants