Add more examples of capability management.

This commit is contained in:
Valentin Lorentz 2020-05-13 19:57:09 +02:00
parent e6c5c3a04c
commit 9c1604e39e

View File

@ -215,6 +215,38 @@ Defaultcapabilities can be restored with either of these two commands::
config setdefault capabilities config setdefault capabilities
config capabilities [config default capabilities] config capabilities [config default capabilities]
Example
-------
To make all this less abstract, here is a popular example of what
capabilities are used for: disabling a plugin or command for everyone
but a select group of people
Allowing only user ``foo`` to use the ``Games`` plugin, globally::
defaultcapability add -games
admin capability add foo games
And to undo it::
defaultcapability remove -Games
admin capability remove foo Games
Same, but only on ``#channel``::
channel capability set #channel -games
channel capability add #channel foo games
channel capability unset #channel -games
channel capability remove #channel foo games
And to forbid only the ``dice`` command of the ``Games`` plugin instead of the
entire plugin, you would use the same commands, but with ``-games.dice`` and
``games.dice`` instead of ``-games`` and ``games``.
Final Word Final Word
---------- ----------