Skip to content

Supybot Website

Sections
Personal tools
You are here: Home » Documentation » Supybot Help Center » Tutorials » Supybot Capabilities » Channel Capabilities

Channel Capabilities

Document Actions
What if #linux wants completely different capabilities from #windows?

ali

An introduction to what we mean when we talk of Supybot and "capabilities"
Page 3 of 5.

But that's not all! The capabilities system also supports channel capabilities, which are capabilities that only apply to a specific channel; they're of the form #channel,capability. Whenever a user issues a command to the bot in a channel, the command dispatcher also checks to make sure the user doesn't have the anticapability for that command in that channel, and if the user does, the bot won't respond to the user in the channel. Thus now, in addition to having the ability to turn individual commands on or off for an individual user, we can now turn commands on or off for an individual user on an individual channel!

So when a user foo sends a command bar to the bot on channel #baz, first the bot checks to see if the user has the anticapability for the command by itself, -bar. If so, it errors right then and there, telling the user that he lacks the bar capability. If the user doesn't have that anticapability, then the bot checks to see if the user issued the command over a channel, and if so, checks to see if the user has the antichannelcapability for that command, #baz,-bar. If so, again, he tells the user that he lacks the bar capability. If neither of these anticapabilities are present, then the bot just responds to the user like normal.

Created by ali
Last modified 17:49 February 06, 2005
 

Powered by Plone

This site conforms to the following standards: