Skip to content

RFC: Make require_privilege imply require_chanmsg #2399

@dgw

Description

@dgw

This is an idea that I keep thinking of, briefly, every so often. I always forget about it again before getting around to opening an issue though. Tonight I finally decided, enough.

I think it's a bit of a potential foot-gun to have @plugin.require_privilege be ignored in PMs, even though it's documented. Seems like it would make more sense to make @plugin.require_privilege imply @plugin.require_chanmsg.

We could also raise an error during plugin loading if a callable is decorated with both @plugin.require_privmsg and either of @plugin.require_chanmsg or @plugin.require_privilege.

Any thoughts from other maintainers about this? Am I failing to consider some obscure but very useful edge case where it would be useful to do this on purpose?

Note: 8.0.0 milestone for attention, since it's a breaking change that would have to wait another who-knows-how-many-years until 9.0 if not done in v8.

Metadata

Metadata

Assignees

Labels

Breaking ChangeStuff that probably should be mentioned in a migration guideTweak

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions