How do I find out channel modes?
Up to table of contentsI want to know who's an op in a certain channel, or who's voiced, or what the modes on the channel are. How do I do that?
Everything you need is kept in a ChannelState object in an IrcState object in the Irc object your plugin is given. To see the ops in a given channel, for instance, you would do this:
irc.state.channels['#channel'].ops
To see a dictionary mapping mode chars to values (if any), you would do this:
irc.state.channels['#channel'].modes
From there, things should be self-evident.
This FAQ applies to: Any version.