Menu

Capabilities

nanotube

Default capabilities

All capabilities are assumed to be positive, unless an explicit anticapability is present. By default, only a limited number of anticapabilities are defined.

The following channel-specific anticapabilities are present by default for channels:

  • -channel,op
  • -channel,halfop
  • -channel,voice
  • -channel,protected

The following non-channel-specific anticapabilities are present in the default config:

  • -admin
  • -owner
  • -trusted

Everything else you have to add yourself using command defaultcapability.

This applies also when you want to by default require some capability for a plugin command you're writing, using ircdb.checkCapability(). If you test for some capability other than those mentioned above, the test will come back positive, since everything else is implicitly allowed, unless you add an anticapability manually beforehand.

Channel capabilities vs. global capabilities

Global capabilities take precedence over channel-specific capabilities. So, for example, if there's a defaultcapability of -factoids.learn, and then you give a registered user a positive #channel,factoids.learn, the user will still be prevented from learning, since the global anticapability takes precedence.

While this may seem counterintuitive (and from the standpoint of fine-tuning user permissions, it is), the reason this is done is that the bot is built with the idea of channel operators being separate from the admins. Thus, it is seen as undesirable if a chanop can override a global anticapability set by the admins by setting a channel-specific capability.

The closest you can really come to giving different people different capabilities in different channels is by using channel default anticapabilities. However, note that these can be bypassed simply by using the command from within a private message, and supplying a channel argument. :TODO: example needed here

In other words, the best recourse is to simply not give capabilities to people who you think are likely to abuse them.


Related

Wiki: Supybot_Resources