mirror of
https://github.com/Mikaela/Limnoria-doc.git
synced 2025-01-12 21:52:32 +01:00
Document capabilities on the plugin side.
This commit is contained in:
parent
c225a54ee4
commit
cf36da527d
55
develop/capabilities.rst
Normal file
55
develop/capabilities.rst
Normal file
@ -0,0 +1,55 @@
|
||||
************
|
||||
Capabilities
|
||||
************
|
||||
|
||||
.. note::
|
||||
I wrote this section with the little knowledge I have of the capabilities
|
||||
system; I work mainly by testing different possibilities until I get what
|
||||
I want.
|
||||
As for all the documentation, feel free to contact me to
|
||||
correct/enhance it.
|
||||
|
||||
First, you should know how capabilities work
|
||||
:ref:`on the user side <capabilities>`.
|
||||
|
||||
Checking for a capability given its name
|
||||
========================================
|
||||
|
||||
You only have to use ``ircdb.checkCapability(prefix, 'capability')``.
|
||||
|
||||
You can also override some behavior of the capability system. Here is the
|
||||
complete documentation of ``ircdb.checkCapabiltiy``:
|
||||
|
||||
.. autofunction:: supybot.ircdb.checkCapability
|
||||
:noindex:
|
||||
|
||||
Manipulating capability names
|
||||
=============================
|
||||
|
||||
Althrough you can manipulate capability names with string operations,
|
||||
Supybot provides a few methods to do that “in the abstract” (could be
|
||||
useful if we change the capability syntax one day…):
|
||||
|
||||
.. autofunction:: supybot.ircdb.isCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.makeChannelCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.isChannelCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.makeAntiCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.unAntiCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.invertCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.isAntiCapability
|
||||
:noindex:
|
||||
|
||||
.. autofunction:: supybot.ircdb.canonicalCapability
|
||||
:noindex:
|
@ -23,6 +23,7 @@ Specific documentation
|
||||
:maxdepth: 2
|
||||
|
||||
using_utils.rst
|
||||
capabilities.rst
|
||||
events.rst
|
||||
httpserver.rst
|
||||
|
||||
@ -36,3 +37,4 @@ Library reference
|
||||
irclib.rst
|
||||
commands.rst
|
||||
ircmsgs.rst
|
||||
ircdb.rst
|
||||
|
@ -1,3 +1,5 @@
|
||||
.. _capabilities:
|
||||
|
||||
************
|
||||
Capabilities
|
||||
************
|
||||
|
Loading…
Reference in New Issue
Block a user