Move FAQ item to the right page.

This commit is contained in:
2021-12-28 23:38:53 +01:00
parent 02e8b2ab1f
commit 604de68302
2 changed files with 18 additions and 18 deletions

View File

@ -24,3 +24,21 @@ The ``irc`` object passed to all event method as well as command methods is an
:py:class:`supybot.irclib.Irc` object, use
:py:meth:`irc.state.nickToHostmask <supybot.irclib.IrcState.nickToHostmask>`
How do I get channel modes when writing a plugin?
=================================================
I 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.

View File

@ -195,24 +195,6 @@ How can I make my Supybot log my IRC channel?
To log all the channels your Supybot is in, simply load the
`ChannelLogger` plugin, which is included in the main distribution.
How do I get channel modes when writing a plugin?
=================================================
I 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.
Can Supybot connect through a proxy server?
===========================================