mirror of
https://github.com/Mikaela/Limnoria-doc.git
synced 2024-11-23 12:39:35 +01:00
Add more examples of capability management.
This commit is contained in:
parent
e6c5c3a04c
commit
9c1604e39e
@ -215,6 +215,38 @@ Defaultcapabilities can be restored with either of these two commands::
|
||||
config setdefault 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
|
||||
----------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user