Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

More efficient way to check user channel access / prefix modes #168

@jlu5

Description

@jlu5

There should be a more efficient way for plugins to check a user's prefix modes in a channel, without having to resort to hacks like https://github.com/GLolol/PyLink/blob/f25c260/plugins/relay.py#L161

More specifically, the IrcChannel class should implement functions like the following:

  • isOp()
  • isHalfop()
  • isVoice()
  • isAdmin()
  • isOwner()
  • getPrefixModes() (returns a joined string of all prefix modes the user has)

And as possible future extensions:

  • isOpPlus
  • isHalfopPlus
  • isVoicePlus
  • canSpeak (checks whether target matches any bans; whether channel is +m and user isn't voiced, and a variety of other situations)
  • canChangeTopic (equals isHalfopPlus if channel is +t, or canSpeak otherwise)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions