ChanServ

From Afterxwiki

Introduction

ChanServ allows you to register and control various aspects of channels. ChanServ can often prevent malicious users from "taking over" channels by limiting who is allowed channel operator privileges. Type /msg ChanServ HELP COMMANDS for a list of ChanServ commands; to use a command, type /msg ChanServ command, or for more information on a command, type /msg ChanServ HELP command.

ChanServ Commands


REGISTER


Syntax:
REGISTER channel password description

Registers a channel in the ChanServ database. In order to use this command, you must first be a channel operator on the channel you're trying to register. The password is used with the IDENTIFY command to allow you to make changes to the channel settings at a later time. The last parameter, which must be included, is a general description of the channel's purpose.
When you register a channel, you are recorded as the "founder" of the channel. The channel founder is allowed to change all of the channel settings for the channel; ChanServ will also automatically give the founder channel-operator privileges when s/he enters the channel. See the /msg ChanServ HELP ACCESS</tt>) for information on giving a subset of these privileges to other channel users.
NOTICE: In order to register a channel, you must have first registered and identified for your nickname. If you haven't, /msg NickServ HELP for information on how to do so.

Non-Services admins may be prevented from registering channels by unsetting the CSEnableRegister option (enabled by default) in modules.conf





SENDPASS (requires the chanserv/sendpass module)


Syntax:
SENDPASS channel

Sends you an E-mail message containing the password for the given channel. You must be the founder of the channel to use this command, and you must first identify for your nickname with the NickServ IDENTIFY command.
If encryption (see section 3-7) is in use, this command may not be available depending on the type of encryption used.





IDENTIFY


Syntax:
IDENTIFY channel password

Authenticates you to ChanServ as the founder of the given channel. Many commands require you to use this command before using them. The password should be the same one you sent with the REGISTER command.





DROP


Syntax:
DROP channel

Unregisters the named channel. Can only be used by channel founder, who must use the IDENTIFY command first. (However, Services admins may drop any channel without identifying for the channel.)





SET


Syntax:
SET channel option parameters

Allows the channel founder to set various channel options and other information. The founder must use the IDENTIFY command before using SET.
Available options:
FOUNDER
Set the founder of a channel
SUCCESSOR
Set the successor for a channel
PASSWORD
Set the founder password
DESC
Set the channel description
URL
Associate a URL with the channel
EMAIL
Associate an E-mail address with the channel
ENTRYMSG
Set a message to be sent to users when they enter the channel
KEEPTOPIC
Retain topic when channel is not in use
TOPICLOCK
Topic can only be changed with TOPIC
MLOCK
Lock channel modes on or off
PRIVATE
Hide channel from LIST command
RESTRICTED
Restrict access to the channel
SECURE
Activate ChanServ security features
SECUREOPS
Stricter control of chanop status
LEAVEOPS
Do not de-op users on channel entry
OPNOTICE
Send a notice when OP/VOICE commands are used
ENFORCE
Enforce auto-op, auto-voice status

Services admins can also set the option NOEXPIRE, with which channels can be prevented from expiring. Additionally, Services admins can set options for any channel without identifying by password for the channel.





SET FOUNDER


Syntax:
SET channel FOUNDER nickname

Changes the founder of a channel. The new nickname must be a registered one.





SET SUCCESSOR


Syntax:
SET channel SUCCESSOR nickname

Changes the successor of a channel. If the founder's nickname expires or is dropped while the channel is still registered, the successor will become the new founder of the channel. However, if the successor already has too many channels registered (20 by default, changeable with the CSMaxReg directive in modules.conf), the channel will be dropped instead, just as if no successor had been set. The nickname must be a registered one.





SET PASSWORD


Syntax:
SET channel PASSWORD password

Sets the password used to identify as the founder of the channel.





SET DESC


Syntax:
SET channel DESC description

Sets the description for the channel, which shows up with the INFO commands.





SET URL


Syntax:
SET channel URL url

Associates the given URL with the channel. This URL will be displayed whenever someone requests information on the channel with the INFO command.





SET EMAIL


Syntax:
SET channel EMAIL address

Associates the given E-mail address with the channel. This address will be displayed whenever someone requests information on the channel with the INFO command.





SET ENTRYMSG


Syntax:
SET channel ENTRYMSG message

Sets the message which will be sent via /NOTICE to users when they enter the channel.





SET KEEPTOPIC


Syntax:
SET channel KEEPTOPIC {ON | OFF}

Enables or disables the topic retention option for a channel. When topic retention is set, the topic for the channel will be remembered by ChanServ even after the last user leaves the channel, and will be restored the next time the channel is created.





SET TOPICLOCK


Syntax:
SET channel TOPICLOCK {ON | OFF}

Enables or disables the topic lock option for a channel. When topic lock is set, ChanServ will not allow the channel topic to be changed except via the TOPIC command.





SET MLOCK


Syntax:
SET channel MLOCK modes

Sets the mode-lock parameter for the channel. ChanServ allows you to define certain channel modes to be always on (or off). All binary modes (n, s, t, k, l, and so on) can be locked; each mode can be locked on, locked off, or not locked. The modes parameter is constructed exactly the same way as a /MODE command; that is, modes followed by a + are locked on, and modes followed by a - are locked off.
Warning: If you set a mode-locked key, as in the second example below, you should also set the RESTRICTED option for the channel, or anyone entering the channel when it is empty will be able to see the key! MLOCK +i will likewise not prevent users from entering the channel when it is empty without being invited.
Examples:
SET #channel MLOCK +nt-ikl
Forces modes n and t on, and modes i, k, and l off. All other modes are left free to be either on or off.
SET #channel MLOCK +knst-ilmp my-key
Forces modes k, n, s, and t on, and modes i, l, m, and p off. Also forces the channel key to be "my-key".
SET #channel MLOCK +
Removes the mode lock; all channel modes are free to be either on or off.





SET HIDE


Syntax:
SET channel HIDE {EMAIL | TOPIC | MLOCK} {ON | OFF}

Allows you to prevent certain pieces of information from being displayed when someone does a ChanServ INFO on the given channel. You can hide the channel's E-mail address (EMAIL), last topic (TOPIC), and mode lock (MLOCK). The second parameter specifies whether the information should be displayed (OFF) or hidden (ON).
Note that the topic will always be hidden if the channel is mode-locked +p or +s.





SET PRIVATE


Syntax:
SET channel PRIVATE {ON | OFF}

Enables or disables the private option for a channel. When private is set, a /msg ChanServ LIST will not include the channel in any lists.





SET RESTRICTED


Syntax:
SET channel RESTRICTED {ON | OFF}

Enables or disables the restricted access option for a channel. When restricted access is set, users who are not on the access list or who would normally be disallowed from having channel operator privileges will be kicked and banned from the channel.





SET SECURE


Syntax:
SET channel SECURE {ON | OFF}

Enables or disables ChanServ's security features for a channel. When SECURE is set, only users who have registered their nicknames with NickServ and IDENTIFY'd with their password will be given privileges on the channel as controlled by the access list. If the RESTRICTED option is also set, users will not be able to join the channel until they identify to NickServ.





SET SECUREOPS


Syntax:
SET channel SECUREOPS {ON | OFF}

Enables or disables the secure ops option for a channel. When secure ops is set, users who are not on the access list will not be allowed chanop status.





SET LEAVEOPS


Syntax:
SET channel LEAVEOPS {ON | OFF}

Enables or disables the leave ops option for a channel. When leave ops is set, ChanServ will leave server ops (+o for the first person in the channel) in place even if the user would not normally get auto-opped. The SECUREOPS option will still be enforced. Notice: This can allow users to "steal" ops during a netsplit.





SET OPNOTICE


Syntax:
SET channel OPNOTICE {ON | OFF}

Enables or disables the op-notice option for a channel. When op-notice is set, ChanServ will send a notice to the channel whenever the OP, VOICE, or related commands are used for a user in the channel.





SET ENFORCE


Syntax:
SET channel ENFORCE {ON | OFF}

Enables or disables the enforce option for a channel. When enforce is set, ChanServ will enforce the auto-op and auto-voice levels for all users. For example, if a user with auto-op privileges is deopped, ChanServ will automatically op the user again, and ChanServ will also not allow the DEOP command to be used on that user.





SET NOEXPIRE


Syntax:
SET channel NOEXPIRE {ON | OFF}

Sets whether the given channel will expire. Setting this to ON prevents the channel from expiring.
Limited to Services admins.





UNSET


Syntax:
UNSET channel {SUCCESSOR | URL | EMAIL | ENTRYMSG}

Clears the given setting for a channel.
As with the SET command, Services admins can clear settings for any channel without identifying for the channel.





SOP (requires the chanserv/access-xop module)


Syntax:
SOP channel ADD nickname
SOP channel DEL nickname
SOP channel LIST [mask | list]
SOP channel COUNT

Maintains the SuperOp (SOP) list for a channel. Users with SOP status are automatically opped (set mode +o) and protected (mode +a), if supported by the IRC server) when they join the channel.
An SOP can modify the AOP, HOP (if the IRC server supports halfops), and VOP lists. Only a channel's founder can modify the SOP list.
The SOP LIST command displays the SOP 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:
SOP #channel LIST 2-5,7-9
Lists SOP list entries numbered 2 through 5 and 7 through 9.
The SOP COUNT command returns the number of entries there are on the SOP list.





AOP (requires the chanserv/access-xop module)


Syntax:
AOP channel ADD nickname
AOP channel DEL nickname
AOP channel LIST [mask | list]
AOP channel COUNT

Maintains the AutoOp (AOP) list for a channel. Users with AOP status are automatically opped (set mode +o) when they join the channel.
An AOP can modify the HOP (if the IRC server supports halfops) and VOP lists; SOPs can modify the AOP list.
The AOP LIST command displays the AOP 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:
AOP #channel LIST 2-5,7-9
Lists AOP list entries numbered 2 through 5 and 7 through 9.
The AOP COUNT command returns the number of entries there are on the AOP list.





HOP (requires the chanserv/access-xop module)


Syntax:
HOP channel ADD nickname
HOP channel DEL nickname
HOP channel LIST [mask | list]
HOP channel COUNT

Maintains the HalfOp (HOP) list for a channel. Users with HOP status are automatically halfopped (set mode +h) when they join the channel.
An HOP can modify the VOP list; SOPs and AOPs can modify the HOP list.
The HOP LIST command displays the HOP 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:
HOP #channel LIST 2-5,7-9
Lists HOP list entries numbered 2 through 5 and 7 through 9.
The HOP COUNT command returns the number of entries there are on the HOP list.
Note that this command is only available if the IRC server in use supports halfops.





VOP (requires the chanserv/access-xop module)


Syntax:
VOP channel ADD nickname
VOP channel DEL nickname
VOP channel LIST [mask | list]
VOP channel COUNT

Maintains the VoiceOp (VOP) list for a channel. Users with VOP status are automatically voiced (set mode +v) when they join the channel.
The VOP LIST command displays the VOP 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:
VOP #channel LIST 2-5,7-9
Lists VOP list entries numbered 2 through 5 and 7 through 9.
The VOP COUNT command returns the number of entries there are on the VOP list.





ACCESS (requires the chanserv/access-levels module)


Syntax:
ACCESS channel ADD nickname level
ACCESS channel DEL {nickname | entry-num | list}
ACCESS channel LIST [mask | list]
ACCESS channel COUNT

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; /msg ChanServ HELP ACCESS LEVELS for more specific information. Any nickname not on the access list has a user level of 0.
The ACCESS ADD command adds the given nickname to the access list with the given user level; if the nick is already present on the list, its access level is changed to the level specified in the command. The level specified must be less than that of the user giving the command, and if the nick is already on the access list, the current access level of that nick must be less than the access level of the user giving the command.
The ACCESS DEL command removes the given nickname from the access list. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)
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 COUNT command returns the number of entries there are on the access list.
Note that the access list may also be manipulated with the AOP, VOP commands, which correspond to levels of 100, 50, 40, and 30 respectively, if the chanserv/access-xop module is also loaded.





LEVELS (requires the chanserv/access-levels module)


Syntax:
LEVELS channel SET type level
LEVELS channel {DIS | DISABLE} type
LEVELS channel LIST
LEVELS channel RESET

The LEVELS command allows fine control over the meaning of the numeric access levels used by the ACCESS command. With this command, you can define the access level required for most of ChanServ's functions. (The SET PASSWORD commands, as well as this command, are always restricted to the channel founder.)
Caution: This command is for advanced users only! Changing level settings with this command may cause the SOP, AOP, HOP, and VOP commands to stop working correctly.
LEVELS SET allows the access level for a function or group of functions to be changed. LEVELS DISABLE (or DIS for short) disables an automatic feature or disallows access to a function by anyone other than the channel founder. LEVELS LIST shows the current levels for each function or group of functions. LEVELS RESET resets the levels to the default levels of a newly-created channel (see HELP ACCESS LEVELS).
For a list of the features and functions whose levels can be set, see HELP LEVELS DESC.





AKICK


Syntax:
AKICK channel ADD mask [reason]
AKICK channel DEL mask
AKICK channel LIST [mask | list]
AKICK channel VIEW [mask | list]
AKICK channel ENFORCE
AKICK channel COUNT

Maintains the autokick list for a channel. If a user on the autokick list attempts to join the channel, ChanServ will ban that user from the channel, then kick the user.
The AKICK ADD command adds the given user@host or nickname!user@host mask to the autokick list. If a reason is given with the command, that reason will be used when the user is kicked; if not, the default reason is "You have been banned from the channel".
The AKICK DEL command removes the given mask from the autokick list. It does not, however, remove any bans placed by an autokick; those must be removed manually.
The AKICK LIST command displays the autokick list, or optionally only those autokick entries which match the given mask. AKICK VIEW is similar, but shows more details.
The AKICK ENFORCE command causes ChanServ to enforce the current autokick list by removing those users who match an autokick mask.
The AKICK COUNT command returns how many entries there are on the autokick list.
By default, limited to users with level 100 (SOP) access and above on the channel.





INFO


Syntax:
INFO channel [ALL]

Lists information about the named registered channel, including its founder, time of registration, last time used, description, and mode lock, if any. If you are identified as the founder of the channel you're getting information for and ALL is specified, the entry message and successor will also be displayed.
Services admins can use the ALL parameter with any channel.





LIST


Syntax:
LIST pattern

Lists all registered channels matching the given pattern. Channels with the PRIVATE option set will only be displayed to Services admins. Channels with the NOEXPIRE option set will have a ! prepended to the channel name for Services admins.
If the FORBIDDEN, SUSPENDED or NOEXPIRE options are given, only channels which, respectively, are forbidden, suspended or have the NOEXPIRE flag set will be displayed. The options can be used in any order and in any combination. These options are limited to Services admins.
If the CSListOpersOnly option is given in modules.conf, only IRC operators will be allowed to use this command.





OP


Syntax:
OP #channel [nickname]

Ops a selected nickname on a channel. If nickname is not given, ops you. By default, limited to users with level 50 (AOP) access and above on the channel.





DEOP


Syntax:
DEOP #channel [nickname]

Deops a selected nickname on a channel. If nickname is not given, deops you. By default, limited to users with level 50 (AOP) access and above on the channel.





VOICE


Syntax:
VOICE #channel [nickname]

Voices a selected nickname on a channel. If nickname is not given, voices you. By default, limited to users with level 30 (VOP) access and above on the channel.





DEVOICE


Syntax:
DEVOICE #channel [nickname]

Devoices a selected nickname on a channel. If nickname is not given, devoices you. By default, limited to users with level 30 (VOP) access and above on the channel.





HALFOP


Syntax:
HALFOP #channel [nickname]

Gives halfop access to a selected nickname on a channel. If nickname is not given, gives you halfop access. By default, limited to users with level 40 (HOP) access and above on the channel. Only available with IRC servers which support halfops.





DEHALFOP


Syntax:
DEHALFOP #channel [nickname]

Removes halfop access from a selected nickname on a channel. If nickname is not given, removes halfop access from you. By default, limited to users with level 40 (HOP) access and above on the channel. Only available with IRC servers which support halfops.





PROTECT


Syntax:
PROTECT #channel [nickname]

Gives channel protection (mode +a) to a selected nickname on a channel. If nickname is not given, gives channel protection to you. By default, limited to users with level 100 (SOP) access and above on the channel. Only available with IRC servers which support this mode.





DEPROTECT


Syntax:
DEPROTECT #channel [nickname]

Removes channel protection (mode +a) from a selected nickname on a channel. If nickname is not given, removes channel protection from you. By default, limited to users with level 100 (SOP) access and above on the channel. Only available with IRC servers which support this mode.





INVITE


Syntax:
INVITE channel

Tells ChanServ to invite you into the given channel. By default, limited to users with level 50 (AOP) access and above on the channel.
Note: If you get a message saying that the channel is not in use, it means that the channel is empty, and you can join it freely without needing to use this command.





UNBAN


Syntax:
UNBAN channel

Tells ChanServ to remove all bans preventing you from entering the given channel. By default, limited to users with level 50 (AOP) access and above on the channel.





KICK


Syntax:
KICK channel nickname [reason]

Tells ChanServ to kick the given nickname from the given channel. The message included in the kick will show who used the KICK command, as well as the reason given with the command, if any. By default, limited to users with level 50 (AOP) access and above on the channel.
Note that protected (+a) users cannot be kicked with this command, even by the channel founder.





TOPIC


Syntax:
TOPIC channel topic

Causes ChanServ to set the channel topic to the one specified. This command is most useful in conjunction with SET TOPICLOCK. By default, limited to users with level 50 (AOP) access and above on the channel.





CLEAR


Syntax:
CLEAR channel what

Tells ChanServ to clear certain settings on a channel. what can be any of the following:
MODES
Clears all modes on the channel except those set in the channel's mode lock.
BANS
Clears all bans on the channel.
EXCEPTIONS
Clears all exceptions on the channel (only available if the IRC server supports ban exceptions).
OPS
Removes channel-operator status (mode +o) from all users.
HALFOPS
Removes halfop status (mode +h) from all users (only available if the IRC server supports halfops).
VOICES
Removes "voice" status (mode +v) from all users.
USERS
Removes (kicks) all users from the channel.

By default, limited to users with level 100 (SOP) access and above on the channel.





STATUS


Syntax:
STATUS channel nickname

Returns the current access level of the given nickname on the given channel. The reply is of the form:

STATUS channel nickname access-level

If an error occurs, the reply will be in the form:

STATUS channel nickname ERROR error-message

By default, limited to users with level 100 (SOP) access and above on the channel.





GETPASS


Syntax:
GETPASS channel

Returns the password for the given channel. Note that whenever this command is used, a message including the person who issued the command and the channel it was used on will be logged and, if the WallGetpass configuration option is set in ircservices.conf, sent out as a WALLOPS or GLOBOPS.
If encryption (see section 3-7) is in use, encryption may not be available depending on the type of encryption used.
Limited to Services admins.





FORBID


Syntax:
FORBID channel

Disallows anyone from registering or using the given channel. May be cancelled by dropping the channel.
Limited to Services admins.





SUSPEND


Syntax:
SUSPEND [+expiry] channel reason

Prevents a channel from being used or identified for by anyone. The channel can be unsuspended with the UNSUSPEND command, which will allow it to be used as before. The expiry parameter is interpreted in the same manner as for the OperServ AKILL command.
Limited to Services admins.





UNSUSPEND


Syntax:
UNSUSPEND channel

Allows users to use and identify for a previously suspended channel.
Limited to Services admins.

Channel Modes

Mode
Description
A
Only Administrators may join
a <nick>
Goves protection to that user, may not be kicked
b <nick!user@host>
Bans the givin user from the channel
c
No ANSI color can be sent to the channel
C
No CTCP's allowed in the channel
e <nick!user@host>
Exception ban – If someone matches this, they can join a channel even if they match an existing ban
f * <lines:seconds>
Flood protection, if the * is given a user will kick banned when they send <lines:seconds> if no * they are just kicked
G
Makes channel G rated. Checks for words listed in the Bad Word Blocks, and replaces them with the words specified
M
A registered nickname (+r) is required to talk
h <nick>
Gives half-op status to the user
i
Invite required
K
/knock is not allowed
k <key>
Sets a key needed to join
l <##>
Sets max number of users
L <Chan>
If the amount set by +l has been reached, users will be sent to this channel
m
Moderated channel. Only +v/o/h users may speak
N
No nick name changes permitted
n
No messages from outside channels
O
Only IRCops may join
o <nick>
Gives a user channel operator status
p
Makes channel private
q
Sets channel owner
Q
Only U:Lined servers can kick users
R
Requires a registered nickname to join
S
Strips all incoming colors
s
Makes channel secret
t
Only chanops can set topic
u
Auditorium Makes /names and /who #channel only show channel ops
V
/invite is not allowed
v <nick>
Gives a voice to users. (May speak in +M Channels
z
Only clients on a Secure (SSL) Connection may join