mirror of
https://github.com/Limnoria/Limnoria-doc.git
synced 2025-04-08 00:09:46 +00:00
Move FAQ item to the right page.
This commit is contained in:
@ -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:class:`supybot.irclib.Irc` object, use
|
||||||
:py:meth:`irc.state.nickToHostmask <supybot.irclib.IrcState.nickToHostmask>`
|
: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.
|
||||||
|
18
use/faq.rst
18
use/faq.rst
@ -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
|
To log all the channels your Supybot is in, simply load the
|
||||||
`ChannelLogger` plugin, which is included in the main distribution.
|
`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?
|
Can Supybot connect through a proxy server?
|
||||||
===========================================
|
===========================================
|
||||||
|
Reference in New Issue
Block a user