Skip to content

Supybot Website

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

Introduction

Document Actions

ali

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

Ok, some explanation of the capabilities system is probably in order. With most IRC bots (including the ones I've written myself prior to this one) "what a user can do" is set in one of two ways. On the really simple bots, each user has a numeric "level" and commands check to see if a user has a "high enough level" to perform some operation. On bots that are slightly more complicated, users have a list of "flags" whose meanings are hardcoded, and the bot checks to see if a user possesses the necessary flag before performing some operation. Both methods, IMO, are rather arbitrary, and force the user and the programmer to be unduly confined to less expressive constructs.

This bot is different. Every user has a set of "capabilities" that is consulted every time they give the bot a command. Commands, rather than checking for a user level of 100, or checking if the user has an o flag, are instead able to check if a user has the owner capability. At this point such a difference might not seem revolutionary, but at least we can already tell that this method is self-documenting, and easier for users and developers to understand what's truly going on.

Created by ali
Last modified 13:39 February 06, 2005
 

Powered by Plone

This site conforms to the following standards: