2.0/Modules/cs access

From AnopeWiki
Jump to: navigation, search
Language

English

Service ChanServ
Module cs_access
Author Anope

Description

Maintains the access list for a channel. The access list specifies which users are allowed chanop status or access to ChanServ commands on the channel. Different user levels allow for access to different subsets of privileges. Any registered user not on the access list has a user level of 0, and any unregistered user has a user level of -1.

The ACCESS ADD command adds the given mask to the access list with the given user level; if the mask is already present on the list, its access level is changed to the level specified in the command. The level specified may be a numerical level or the name of a privilege (eg AUTOOP). When a user joins the channel the access they receive is from the highest level entry in the access list. The given mask may also be a channel, which will use the access list from the other channel up to the given level.

The ACCESS DEL command removes the given nick from the access list. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.) You may remove yourself from an access list, even if you do not have access to modify that list otherwise.

The ACCESS LIST command displays the access list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:

ACCESS #channel LIST 2-5,7-9
Lists access entries numbered 2 through 5 and 7 through 9.

The ACCESS VIEW command displays the access list similar to ACCESS LIST but shows the creator and last used time.

The ACCESS CLEAR command clears all entries of the access list.

User access levels can be seen by using the LEVELS command; type /msg ChanServ HELP LEVELS for information.

Commands

ACCESS #channel ADD mask level
ACCESS #channel DEL {mask | entry-num | list}
ACCESS #channel LIST [mask | list]
ACCESS #channel VIEW [mask | list]
ACCESS #channel CLEAR

Examples

/msg ChanServ ACCESS #myChannel ADD *!Fred@*.example.com 10

/msg ChanServ ACCESS #myChannel DEL 1

/msg ChanServ ACCESS #myChannel LIST 2-4,7-9

/msg ChanServ ACCESS #myChannel VIEW Fred@*

/msg ChanServ ACCESS #myChannel CLEAR

Default Configuration

/*
 * cs_access
 *
 * Provides commands chanserv/access and chanserv/levels.
 * Provides the access system "levels".
 *
 * Used for giving users access in channels using a levels system. Allows allows redefining which privileges
 * are representated by given level on a per channel basis.
 *
 * The "LIST" subcommand of chanserv/access will show every access entry on the channel, including access
 * entries not added by cs_access. The "level" of these entries will be the representation of the access
 * entry by the other access system, which could be an XOP command name, or a set of flags.
 */
module { name = "cs_access" }
command { service = "ChanServ"; name = "ACCESS"; command = "chanserv/access"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "LEVELS"; command = "chanserv/levels"; group = "chanserv/access"; }