/*
 * Example configuration file for ChanServ.
 */

/*
 * First, create the service.
 * Note that an easy way to rename this service is to define{} the client name to something else.
 */
service
{
	/*
	 * The name of the ChanServ client.
	 */
	nick = "ChanServ"

	/*
	 * The username of the ChanServ client.
	 */
	user = "services"

	/*
	 * The hostname of the ChanServ client.
	 */
	host = "services.host"

	/*
	 * The realname of the ChanServ client.
	 */
	gecos = "Channel Registration Service"

	/*
	 * The modes this client should use.
	 * Do not modify this unless you know what you are doing.
	 *
	 * These modes are very IRCd specific. If left commented, sane defaults
	 * are used based on what protocol module you have loaded.
	 *
	 * Note that setting this option incorrectly could potentially BREAK some, if
	 * not all, usefulness of the client. We will not support you if this client is
	 * unable to do certain things if this option is enabled.
	 */
	#modes = "+o"

	/*
	 * An optional comma separated list of channels this service should join. Outside
	 * of log channels this is not very useful, as the service will just idle in the
	 * specified channels, and will not accept any types of commands.
	 *
	 * Prefixes may be given to the channels in the form of mode characters or prefix symbols.
	 */
	#channels = "@#services,#mychan"
}

/*
 * Core ChanServ module.
 *
 * Provides essential functionality for ChanServ.
 */
module { name = "chanserv" }

/*
 * Configuration for ChanServ provided by cs_main.
 */
chanserv
{
	/*
	 * The name of the client that should be ChanServ.
	 */
	name = "ChanServ"

	/*
	 * The default options for newly registered channels. Note that changing these options
	 * will have no effect on channels which are already registered. The list must be separated
	 * by spaces.
	 *
	 * The options are:
	 * -     keeptopic: Retain topic when the channel is not in use
	 * -         peace: Disallow users from kicking or removing modes from others who are of the same
	 *                    access level or superior
	 * -       private: Hide the channel from ChanServ's LIST command
	 * -    restricted: Kick/ban users who are restricted from the channel
	 * -        secure: Enable channel security, requiring the user to be identified with NickServ in
	 *                    order to be considered for being on the access list of the channel
	 * -     secureops: Only allow operator status to be given if the user is on the access list
	 * - securefounder: Only allow the real founder of the channel to drop the channel, change it's
	 *                    password, or change the founder or successor
	 * -      signkick: Use of ChanServ's KICK command will cause the user's nick to be signed to the kick.
	 * - signkicklevel: Same as above, but the kick will not be signed if the user is at the same access
	 *                    level or superior to the target
	 * -     topiclock: Disallow the topic to be changed except with ChanServ's TOPIC command
	 * -       persist: Keep the channel open at all times
	 * -      noautoop: Disables autoop on the channel
	 * -          none: No defaults
	 *
	 * This directive is optional, if left blank, the options will default to keeptopic, secure, securefounder,
	 * and signkick. If you really want no defaults, use "none" by itself as the option.
	 */
	defaults="keeptopic peace secure securefounder signkick"

	/*
	 * The maximum number of channels which may be registered to a single nickname.
	 *
	 * This directive is optional, but recommended.
	 * If not set, there will be no restriction on the numbers of channels a single nickname can have registered.
	 */
	maxregistered = 20

	/*
	 * The length of time before a channel registration expires.
	 *
	 * This directive is optional, but recommended.
	 * If not set, the default is 14 days.
	 */
	expire = 14d

	/*
	 * The length of time before a suspended channel becomes unsuspended.
	 *
	 * This directive is optional.
	 * If not set, the default is never.
	 */
	#suspendexpire = 90d

	/*
	 * The lenth of time before a forbidden channel drops.
	 *
	 * This directive is optional.
	 * If not set, the default is never.
	 */
	#forbidexpire = 90d

	/*
	 * The default ban type for newly registered channels (and when importing old databases).
	 *
	 * defbantype can be:
	 *
	 * 0: ban in the form of *!user@host
	 * 1: ban in the form of *!*user@host
	 * 2: ban in the form of *!*@host
	 * 3: ban in the form of *!*user@*.domain
	 */
	defbantype = 2

	/*
	 * The maximum number of entries on a channel's access list.
	 */
	accessmax = 1024

	/*
	 * The maximum number of entries on a channel's autokick list.
	 */
	autokickmax = 32

	/*
	 * The default reason for an autokick if none is given.
	 */
	autokickreason = "User has been banned from the channel"

	/*
	 * The length of time ChanServ stays in a channel after kicking a user from a channel they are not
	 * permitted to be in. This only occurs when the user is the only one in the channel.
	 */
	inhabit = 15s

	/*
	 * The maximum number of channels to be returned for a ChanServ LIST command.
	 */
	listmax = 50

	/*
	 * Allow only IRC Operators to use ChanServ.
	 *
	 * This directive is optional.
	 */
	#opersonly = yes

	/*
	 * Default modes for mode lock, these are set on newly registered channels.
	 *
	 * If not set, the default is +nrt.
	 */
	mlock = "+nrt"

	/*
	 * Modes that will not be allowed to be locked. Oper only modes such as +O
	 * are always restricted from regular users and are not affected by this.
	 * Comment out for no restrictions.
	 */
	#nomlock = "P"

	/*
	 * Modes that are required to be set and only set on all registered channels.
	 * These modes can not be locked or unlocked.
	 */
	require = "r"

	/*
	 * Some IRCds can enforce mode locks server-side. This reduces the spam caused by
	 * services immediately reversing mode changes for locked modes.
	 */
	use_server_side_mlock = yes

	/*
	 * Some IRCds can enforce topic locks server-side. This reduces the spam caused by
	 * services immediately reversing topic changes.
	 */
	use_server_side_topiclock = yes

	/*
	 * The maximum length of the reason field for user commands such as chanserv/kick
	 * and chanserv/ban.
	 */
	reasonmax = 200
}

/*
 * ChanServ privilege configuration.
 *
 * ChanServ privileges are used to determine who has what access in channels. By default the core has its own
 * set of levels it uses for various ChanServ commands, which are defined below. Privilege ranks are used to
 * determine how powerful privileges are relative to each other, which is used by Anope to determine who has greater
 * access in a channel.
 *
 * If you loaded cs_access, you may define a level for the privilege, which is used by chanserv/access and chanserv/levels.
 * The levels defined will be used as the default levels for newly registered channels.
 * The level "founder" is a special level which means anyone with the privilege FOUNDER on the channel
 * has that permission. Additionally, the level "disabled" means that no one can use the privilege, including founders.
 *
 * If you loaded cs_flags, you may define a flag associated with that privilege for use in chanserv/flags.
 *
 * Defining new privileges here is not useful unless you have a module (eg, a third party one) made to check for
 * the specific level you are defining.
 *
 * Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
 */

/*
 * ACCESS_CHANGE privilege.
 *
 * Used by chanserv/access, chanserv/flags and chanserv/xop.
 *
 * Users with this permission can modify the permissions of others.
 */
privilege
{
	name = "ACCESS_CHANGE"
	desc = "Allowed to modify the access list"
	rank = 0
	level = 10
	flag = "f"
}

/*
 * ACCESS_LIST privilege.
 *
 * Used by chanserv/access, chanserv/flags, and chanserv/xop.
 *
 * Users with this permission can view the access list of channels.
 */
privilege
{
	name = "ACCESS_LIST"
	desc = "Allowed to view the access list"
	rank = 10
	level = 3
	flag = "f"
}

/*
 * AKICK privilege.
 *
 * Used by chanserv/akick and chanserv/enforce.
 *
 * Users with this permission can modify the AKICK list.
 */
privilege
{
	name = "AKICK"
	desc = "Allowed to use the AKICK command"
	rank = 250
	level = 10
	flag = "K"
}

/*
 * ASSIGN privilege.
 *
 * Used by botserv/assign.
 *
 * Users with this permission can assign and unassign BotServ bots to and from the channel.
 */
privilege
{
	name = "ASSIGN"
	desc = "Allowed to assign/unassign a bot"
	rank = 270
	level = "founder"
	flag = "s"
}

/*
 * AUTOHALFOP privilege.
 *
 * Used by the core.
 *
 * Users with this permission get halfop on join.
 */
privilege
{
	name = "AUTOHALFOP"
	desc = "Automatic mode +h"
	rank = 100
	level = 4
	flag = "H"
}

/*
 * AUTOOP privilege.
 *
 * Used by the core.
 *
 * Users with this permission get op on join.
 */
privilege
{
	name = "AUTOOP"
	desc = "Automatic channel operator status"
	rank = 210
	level = 5
	flag = "O"
}

/*
 * AUTOOWNER privilege.
 *
 * Used by the core.
 *
 * Users with this permission get owner on join.
 */
privilege
{
	name = "AUTOOWNER"
	desc = "Automatic mode +q"
	rank = 330
	level = 9999
	flag = "Q"
}

/*
 * AUTOPROTECT privilege.
 *
 * Used by the core.
 *
 * Users with this permission get admin on join.
 */
privilege
{
	name = "AUTOPROTECT"
	desc = "Automatic mode +a"
	rank = 240
	level = 10
	flag = "A"
}

/*
 * AUTOVOICE privilege.
 *
 * Used by the core.
 *
 * Users with this permission get voice on join.
 */
privilege
{
	name = "AUTOVOICE"
	desc = "Automatic mode +v"
	rank = 50
	level = 3
	flag = "V"
}

/*
 * BADWORDS privilege.
 *
 * Used by botserv/badwords.
 *
 * Users with this permission can modify BotServ's BADWORDS list.
 */
privilege
{
	name = "BADWORDS"
	desc = "Allowed to modify channel badwords list"
	rank = 260
	level = 10
	flag = "K"
}

/*
 * BAN privilege.
 *
 * Used by chanserv/ban.
 *
 * Users with this permission can use the BAN command.
 */
privilege
{
	name = "BAN"
	desc = "Allowed to ban users"
	rank = 150
	level = 4
	flag = "b"
}

/*
 * FANTASIA privilege.
 *
 * Used by botserv/main and chanserv/xop.
 *
 * Users with this permission can use fantasy commands in the channel.
 */
privilege
{
	name = "FANTASIA"
	desc = "Allowed to use fantasy commands"
	rank = 30
	level = 3
	flag = "c"
}

/*
 * FOUNDER privilege.
 *
 * Used by chanserv/access, chanserv/akick,
 * chanserv/drop, chanserv/set/founder,
 * chanserv/set/securefounder, chanserv/set/successor and chanserv/xop.
 *
 * Users with this permission are treated as founders and can use
 * commands restricted to founders.
 */
privilege
{
	name = "FOUNDER"
	desc = "Allowed to issue commands restricted to channel founders"
	rank = 360
	level = "founder"
	flag = "F"
}

/*
 * GETKEY privilege.
 *
 * Used by chanserv/getkey and nickserv/ajoin.
 *
 * Users with this permission can get they channel key with GETKEY and
 * can use nickserv/ajoin to join channels with keys.
 */
privilege
{
	name = "GETKEY"
	desc = "Allowed to use GETKEY command"
	rank = 180
	level = 5
	flag = "G"
}

/*
 * GREET privilege.
 *
 * Used by botserv/main.
 *
 * Users with this permission get their greet shown on join.
 */
privilege
{
	name = "GREET"
	desc = "Greet message displayed on join"
	rank = 40
	level = 5
	flag = "g"
}

/*
 * HALFOP privilege.
 *
 * Used by chanserv/mode, chanserv/halfop and chanserv/dehalfop.
 *
 * Users with this permission can use ChanServ to halfop and dehalfop
 * others in the channel.
 */
privilege
{
	name = "HALFOP"
	desc = "Allowed to (de)halfop users"
	rank = 120
	level = 5
	flag = "h"
}

/*
 * HALFOPME privilege.
 *
 * Used by chanserv/mode, chanserv/halfop and chanserv/dehalfop.
 *
 * Users with this permission can use ChanServ to halfop and dehalfop
 * themselves in the channel.
 */
privilege
{
	name = "HALFOPME"
	desc = "Allowed to (de)halfop him/herself"
	rank = 110
	level = 4
	flag = "h"
}

/*
 * INFO privilege.
 *
 * Used by botserv/info and chanserv/info.
 *
 * Users with this permission are allowed to get the full INFO output
 * from BotServ and ChanServ.
 */
privilege
{
	name = "INFO"
	desc = "Allowed to get full INFO output"
	rank = 80
	level = 9999
	flag = "I"
}

/*
 * INVITE privilege.
 *
 * Used by chanserv/invite and nickserv/ajoin.
 *
 * Users with this permission can invite users through ChanServ and
 * join invite only channels with nickserv/ajoin.
 */
privilege
{
	name = "INVITE"
	desc = "Allowed to use the INVITE command"
	rank = 190
	level = 5
	flag = "i"
}

/*
 * KICK privilege.
 *
 * Used by chanserv/kick.
 *
 * Users with this permission can use the KICK command.
 */
privilege
{
	name = "KICK"
	desc = "Allowed to use the KICK command"
	rank = 130
	level = 4
	flag = "k"
}

/*
 * MEMO privilege.
 *
 * Used by memoserv/del, memoserv/ignore, memoserv/info, memoserv/list,
 * memoserv/main, memoserv/read and memoserv/set.
 *
 * Users with this permission can manage channel memos.
 */
privilege
{
	name = "MEMO"
	desc = "Allowed to read channel memos"
	rank = 280
	level = 10
	flag = "m"
}

/*
 * MODE privilege.
 *
 * Used by chanserv/mode.
 *
 * Users with this permission can set modes through ChanServ and change
 * the mode lock.
 */
privilege
{
	name = "MODE"
	desc = "Allowed to use the MODE command"
	rank = 170
	level = 9999
	flag = "s"
}

/*
 * NOKICK privilege.
 *
 * Used by botserv/kick.
 *
 * Users with this permission are spared from automated BotServ kicks.
 */
privilege
{
	name = "NOKICK"
	desc = "Prevents users being kicked by Services"
	rank = 20
	level = 1
	flag = "N"
}

/*
 * OPDEOP privilege.
 *
 * Used by chanserv/mode, chanserv/op and chanserv/deop.
 *
 * Users with this permission can use ChanServ to op and deop
 * others in the channel.
 */
privilege
{
	name = "OPDEOP"
	desc = "Allowed to (de)op users"
	rank = 230
	level = 5
	flag = "o"
}

/*
 * OPDEOPME privilege.
 *
 * Used by chanserv/mode, chanserv/op and chanserv/deop.
 *
 * Users with this permission can use ChanServ to op and deop
 * themselves in the channel.
 */
privilege
{
	name = "OPDEOPME"
	desc = "Allowed to (de)op him/herself"
	rank = 220
	level = 5
	flag = "o"
}

/*
 * OWNER privilege.
 *
 * Used by chanserv/mode, chanserv/owner and chanserv/deowner.
 *
 * Users with this permission can use ChanServ to owner and deowner
 * others in the channel.
 */
privilege
{
	name = "OWNER"
	desc = "Allowed to (de)owner users"
	rank = 350
	level = "founder"
	flag = "q"
}

/*
 * OWNERME privilege.
 *
 * Used by chanserv/mode, chanserv/owner and chanserv/deowner.
 *
 * Users with this permission can use ChanServ to owner and deowner
 * themselves in the channel.
 */
privilege
{
	name = "OWNERME"
	desc = "Allowed to (de)owner him/herself"
	rank = 340
	level = 9999
	flag = "q"
}

/*
 * PROTECT privilege.
 *
 * Used by chanserv/mode, chanserv/protect and chanserv/deprotect.
 *
 * Users with this permission can use ChanServ to protect and deprotect
 * others in the channel.
 */
privilege
{
	name = "PROTECT"
	desc = "Allowed to (de)protect users"
	rank = 310
	level = 9999
	flag = "a"
}

/*
 * PROTECTME privilege.
 *
 * Used by chanserv/mode, chanserv/protect and chanserv/deprotect.
 *
 * Users with this permission can use ChanServ to protect and deprotect
 * themselves in the channel.
 */
privilege
{
	name = "PROTECTME"
	desc = "Allowed to (de)protect him/herself"
	rank = 300
	level = 10
	flag = "a"
}

/*
 * SAY privilege.
 *
 * Used by botserv/control.
 *
 * Users with this permission can use the BotServ bot in the channel to
 * say or do a /me with the provided message.
 */
privilege
{
	name = "SAY"
	desc = "Allowed to use SAY and ACT commands"
	rank = 90
	level = 5
	flag = "B"
}

/*
 * SET privilege.
 *
 * Used by botserv/kick, botserv/set, chanserv/clone, chanserv/log,
 * chanserv/saset/noexpire and chanserv/set.
 *
 * Users with this permission can set what BotServ will kick for, change
 * BotServ and ChanServ settings, clone ChanServ channel setings, and
 * set ChanServ logging options.
 */
privilege
{
	name = "SET"
	desc = "Allowed to set channel settings"
	rank = 320
	level = 9999
	flag = "s"
}

/*
 * SIGNKICK privilege.
 *
 * Used by chanserv/ban and chanserv/kick.
 *
 * Users with this permission won't get their nick shown in the kick
 * through ChanServ when the setting SIGNKICK is set to LEVEL.
 */
privilege
{
	name = "SIGNKICK"
	desc = "No signed kick when SIGNKICK LEVEL is used"
	rank = 140
	level = 9999
	flag = "K"
}

/*
 * TOPIC privilege.
 *
 * Used by chanserv/topic.
 *
 * Users with this permission can change the channel topic through ChanServ.
 */
privilege
{
	name = "TOPIC"
	desc = "Allowed to change channel topics"
	rank = 160
	level = 5
	flag = "t"
}

/*
 * UNBAN privilege.
 *
 * Used by chanserv/unban.
 *
 * Users with this permission can unban themselves and others through ChanServ.
 */
privilege
{
	name = "UNBAN"
	desc = "Allowed to unban users"
	rank = 200
	level = 4
	flag = "u"
}

/*
 * VOICE privilege.
 *
 * Used by chanserv/mode, chanserv/voice and chanserv/devoice.
 *
 * Users with this permission can use ChanServ to voice and devoice
 * others in the channel.
 */
privilege
{
	name = "VOICE"
	desc = "Allowed to (de)voice users"
	rank = 70
	level = 4
	flag = "v"
}

/*
 * VOICEME privilege.
 *
 * Used by chanserv/mode, chanserv/voice and chanserv/devoice.
 *
 * Users with this permission can use ChanServ to voice and devoice
 * themselves in the channel.
 */
privilege
{
	name = "VOICEME"
	desc = "Allowed to (de)voice him/herself"
	rank = 60
	level = 3
	flag = "v"
}

/*
 * Core ChanServ commands.
 *
 * In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
 * are loaded you can then configure the commands to be added to any client you like with any name you like.
 *
 * Additionally, you may provide a permission name that must be in the opertype of users executing the command.
 *
 * Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
 */

/* Command group configuration for ChanServ.
 *
 * Commands may optionally be placed into groups to make ChanServ's HELP output easier to understand.
 * Remove the following groups to use the old behavior of simply listing all ChanServ commands from HELP.
 */
command_group
{
	name = "chanserv/access"
	description = "Used to manage the list of privileged users"
}

command_group
{
	name = "chanserv/status"
	description = "Used to modify the channel status of you or other users"
}

command_group
{
	name = "chanserv/management"
	description = "Used to manage channels"
}

command_group
{
	name = "chanserv/admin"
	description = "Services Operator commands"
}

/* Give it a help command. */
command { service = "ChanServ"; name = "HELP"; command = "generic/help"; }

/*
 * cs_access
 *
 * Provides commands chanserv/access and chanserv/levels.
 * Provides the access system "levels".
 *
 * Used for giving users access in channels.
 */
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"; }

/*
 * cs_akick
 *
 * Provides the command chanserv/akick.
 *
 * Used for preventing users from joining channels.
 */
module { name = "cs_akick" }
command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; group = "chanserv/management"; }

/*
 * cs_ban
 *
 * Provides the command chanserv/ban.
 *
 * Used for banning users from channels.
 */
module { name = "cs_ban" }
command { service = "ChanServ"; name = "BAN"; command = "chanserv/ban"; }

/*
 * cs_clone
 *
 * Provides the command chanserv/clone.
 *
 * Used for copying channel settings from one channel to another.
 */
module { name = "cs_clone" }
command { service = "ChanServ"; name = "CLONE"; command = "chanserv/clone"; group = "chanserv/management"; }

/*
 * cs_drop
 *
 * Provides the command chanserv/drop.
 *
 * Used for unregistering channels.
 */
module { name = "cs_drop" }
command { service = "ChanServ"; name = "DROP"; command = "chanserv/drop"; }

/*
 * cs_enforce
 *
 * Provides the command chanserv/enforce.
 *
 * Used to enforce various channel settings such as secureops and restricted.
 */
module { name = "cs_enforce" }
command { service = "ChanServ"; name = "ENFORCE"; command = "chanserv/enforce"; group = "chanserv/management"; }

/*
 * cs_entrymsg
 *
 * Provides the command chanserv/entrymsg.
 *
 * Used to configure entry messages sent to users when they join a channel.
 */
module { name = "cs_entrymsg" }
command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"; group = "chanserv/management"; }
cs_entrymsg
{
	/* The maximum number of entrymsgs allowed per channel. If not set, defaults to 5. */
	maxentries = 5
}

/*
 * cs_flags
 *
 * Provides the command chanserv/flags.
 * Provides the access system "flags".
 *
 * Used for giving users access in channels.
 */
module { name = "cs_flags" }
command { service = "ChanServ"; name = "FLAGS"; command = "chanserv/flags"; group = "chanserv/access"; }

/*
 * cs_getkey
 *
 * Provides the command chanserv/getkey.
 *
 * Used for getting the key for channels.
 */
module { name = "cs_getkey" }
command { service = "ChanServ"; name = "GETKEY"; command = "chanserv/getkey"; }

/*
 * cs_info
 *
 * Provides the command chanserv/info.
 *
 * Used for getting information about channels.
 */
module { name = "cs_info" }
command { service = "ChanServ"; name = "INFO"; command = "chanserv/info"; }

/*
 * cs_invite
 *
 * Provides the command chanserv/invite.
 *
 * Used for inviting yourself in to channels.
 */
module { name = "cs_invite" }
command { service = "ChanServ"; name = "INVITE"; command = "chanserv/invite"; }

/*
 * cs_kick
 *
 * Provides the command chanserv/kick.
 *
 * Used for kicking users from channels.
 */
module { name = "cs_kick" }
command { service = "ChanServ"; name = "KICK"; command = "chanserv/kick"; }

/*
 * cs_list
 *
 * Provides the command chanserv/list.
 *
 * Used for retrieving and searching the registered channel list.
 */
module { name = "cs_list" }
command { service = "ChanServ"; name = "LIST"; command = "chanserv/list"; permission = "chanserv/list"; group = "chanserv/admin"; }

/*
 * cs_log
 *
 * Provides the command chanserv/log.
 *
 * Use for configuring what actions on channels are logged and where.
 */
module { name = "cs_log" }
command { service = "ChanServ"; name = "LOG"; command = "chanserv/log"; group = "chanserv/management"; }

/*
 * cs_mode
 *
 * Provides the command chanserv/mode.
 *
 * Used for changing mode locks and changing modes.
 */
module { name = "cs_mode" }
command { service = "ChanServ"; name = "MODE"; command = "chanserv/mode"; group = "chanserv/management"; }

/*
 * cs_register
 *
 * Provides the commands chanserv/register.
 *
 * Used for registering channels.
 */
module { name = "cs_register" }
command { service = "ChanServ"; name = "REGISTER"; command = "chanserv/register"; }

/*
 * cs_seen
 *
 * Provides the commands chanserv/seen and operserv/seen.
 *
 * Records the last time a user was seen and what they were doing and allows users to request this data.
 * Also allows administrators to view stats about seen data and purge the database.
 */
module { name = "cs_seen" }
command { service = "OperServ"; name = "SEEN"; command = "operserv/seen"; permission = "operserv/seen"; }
cs_seen
{
	/* Sets the time to keep seen entries in the seen database. */
	purgetime = "30d"

	/* Sets the delay between checks for expired seen entries. */
	expiretimeout = "1d"
}

/*
 * cs_set
 *
 * Provides the commands:
 *   chanserv/set and chanserv/saset - Dummy help wrappers for the SET and SASET commands.
 *   chanserv/set/autoop - Used for configuring whether or not ChanServ automatically gives channel status to users.
 *   chanserv/set/bantype - Used for controlling what format of bans are placed on channels.
 *   chanserv/set/description - Used for changing channels descriptions.
 *   chanserv/set/founder - Used for changing a channel's founder.
 *   chanserv/set/keeptopic -  Used for configuring if ChanServ is to restore the channel topic when a channel is created.
 *   chanserv/set/peace - Used for configuring if users are able to kick other users with higher access than them.
 *   chanserv/set/persist - Used for setting whether ChanServ should stay in channels after the last user leaves.
 *   chanserv/set/private - Used for setting whether channels should show up in chanserv/list.
 *   chanserv/set/restricted - Used for setting whether users not on a channel's access list can join.
 *   chanserv/set/secure - Used for setting whether users who are recognized for accounts should have their access in channels.
 *   chanserv/set/securefounder - Used for setting whether users with founder level access in channels have true founder or not.
 *   chanserv/set/secureops - Used for restricting who can have channel op privilege in a channel to those whom have access in the channel.
 *   chanserv/set/signkick - Used for setting signkick, which appends the kicker's name to kicks sent through ChanServ.
 *   chanserv/set/successor - Used for setting channel successors, which become channel founders if the founders' account expires.
 *   chanserv/saset/noexpire - Used for setting noexpire, which prevents channels from expiring.
 *
 * This is a dummy command to provide a help wrapper for the various SET and SASET commands.
 */
module { name = "cs_set" }

command { service = "ChanServ"; name = "SET"; command = "chanserv/set"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET"; command = "chanserv/saset"; permission = "chanserv/saset/"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET AUTOOP"; command = "chanserv/set/autoop"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET AUTOOP"; command = "chanserv/set/autoop"; permission = "chanserv/saset/autoop"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET BANTYPE"; command = "chanserv/set/bantype"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET BANTYPE"; command = "chanserv/set/bantype"; permission = "chanserv/saset/bantype"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET DESCRIPTION"; command = "chanserv/set/description"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SET DESC"; command = "chanserv/set/description"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET DESCRIPTION"; command = "chanserv/set/description"; permission = "chanserv/saset/description"; group = "chanserv/admin"; }
command { service = "ChanServ"; name = "SASET DESC"; command = "chanserv/set/description"; permission = "chanserv/saset/description"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET FOUNDER"; command = "chanserv/set/founder"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET FOUNDER"; command = "chanserv/set/founder"; permission = "chanserv/saset/founder"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET KEEPTOPIC"; command = "chanserv/set/keeptopic"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET KEEPTOPIC"; command = "chanserv/set/keeptopic"; permission = "chanserv/saset/keeptopic"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET PEACE"; command = "chanserv/set/peace"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET PEACE"; command = "chanserv/set/peace"; permission = "chanserv/saset/peace"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET PERSIST"; command = "chanserv/set/persist"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET PERSIST"; command = "chanserv/set/persist"; permission = "chanserv/saset/persist"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET PRIVATE"; command = "chanserv/set/private"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET PRIVATE"; command = "chanserv/set/private"; permission = "chanserv/saset/private"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET RESTRICTED"; command = "chanserv/set/restricted"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET RESTRICTED"; command = "chanserv/set/restricted"; permission = "chanserv/saset/restricted"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET SECURE"; command = "chanserv/set/secure"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET SECURE"; command = "chanserv/set/secure"; permission = "chanserv/saset/secure"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET SECUREFOUNDER"; command = "chanserv/set/securefounder"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET SECUREFOUNDER"; command = "chanserv/set/securefounder"; permission = "chanserv/saset/securefounder"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET SECUREOPS"; command = "chanserv/set/secureops"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET SECUREOPS"; command = "chanserv/set/secureops"; permission = "chanserv/saset/secureops"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET SIGNKICK"; command = "chanserv/set/signkick"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET SIGNKICK"; command = "chanserv/set/signkick"; permission = "chanserv/saset/signkick"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SET SUCCESSOR"; command = "chanserv/set/successor"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "SASET SUCCESSOR"; command = "chanserv/set/successor"; permission = "chanserv/saset/successor"; group = "chanserv/admin"; }

command { service = "ChanServ"; name = "SASET NOEXPIRE"; command = "chanserv/saset/noexpire"; permission = "chanserv/saset/noexpire"; group = "chanserv/admin"; }

/*
 * cs_set_misc
 *
 * Provides the command chanserv/set/misc.
 *
 * Allows you to create arbitrary commands to set data, and have that data show up in chanserv/info.
 * A field named misc_description may be given for use with help output.
 */
module { name = "cs_set_misc" }
command { service = "ChanServ"; name = "SET URL"; command = "chanserv/set/misc"; group = "chanserv/management"; misc_description = _("Associate a URL with the channel"); }
command { service = "ChanServ"; name = "SASET URL"; command = "chanserv/set/misc"; group = "chanserv/management"; misc_description = _("Associate a URL with the channel"); permission = "chanserv/saset/url"; group = "chanserv/admin"; }
command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc"; group = "chanserv/management"; misc_description = _("Associate an E-mail address with the channel"); }
command { service = "ChanServ"; name = "SASET EMAIL"; command = "chanserv/set/misc"; group = "chanserv/management"; misc_description = _("Associate an E-mail address with the channel"); permission = "chanserv/saset/email"; group = "chanserv/admin"; }

/*
 * cs_status
 *
 * Provides the command chanserv/status.
 *
 * Used for determining a user's access on a channel and whether
 * or not they match any autokick entries.
 */
module { name = "cs_status" }
command { service = "ChanServ"; name = "STATUS"; command = "chanserv/status"; }

/*
 * cs_suspend
 *
 * Provides the commands chanserv/suspend and chanserv/unsuspend.
 *
 * Used for suspending and unsuspending channels. Suspended channels can not be used but their settings are stored.
 */
module { name = "cs_suspend" }
command { service = "ChanServ"; name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; group = "chanserv/admin"; }
command { service = "ChanServ"; name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; group = "chanserv/admin"; }

/*
 * cs_sync
 *
 * Provides the command chanserv/sync.
 *
 * Used to sync users channel status modes with what access they have.
 */
module { name = "cs_sync" }
command { service = "ChanServ"; name = "SYNC"; command = "chanserv/sync"; group = "chanserv/management"; }

/*
 * cs_topic
 *
 * Provides the command chanserv/topic.
 *
 * Used for changing the channel topic. Useful in conjunction with chanserv/set/topiclock.
 */
module { name = "cs_topic" }
command { service = "ChanServ"; name = "TOPIC"; command = "chanserv/topic"; group = "chanserv/management"; }

/*
 * cs_unban
 *
 * Provides the command chanserv/unban.
 *
 * Used for unbanning users from channels.
 */
module { name = "cs_unban" }
command { service = "ChanServ"; name = "UNBAN"; command = "chanserv/unban"; }

/*
 * cs_updown
 *
 * Provides the commands chanserv/up and chanserv/down.
 *
 * Used for setting or removing your status modes on a channel.
 */
module { name = "cs_updown" }
command { service = "ChanServ"; name = "DOWN"; command = "chanserv/down"; group = "chanserv/status"; }
command { service = "ChanServ"; name = "UP"; command = "chanserv/up"; group = "chanserv/status"; }

/*
 * cs_xop
 *
 * Provides the commands chanserv/qop, chanserv/sop, chanserv/aop, chanserv/hop, and chanserv/vop.
 * Provides the access system "XOP".
 *
 * Used for giving users access in channels.
 */
module { name = "cs_xop" }
command { service = "ChanServ"; name = "QOP"; command = "chanserv/qop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "SOP"; command = "chanserv/sop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "AOP"; command = "chanserv/aop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "HOP"; command = "chanserv/hop"; group = "chanserv/access"; }
command { service = "ChanServ"; name = "VOP"; command = "chanserv/vop"; group = "chanserv/access"; }


/* Use m_rewrite to rewrite the op, deop, etc. commands (see modules.conf). */

/* OWNER and DEOWNER commands */
command
{
	service = "ChanServ"; name = "OWNER"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "OWNER $"
	rewrite_target = "MODE $1 SET +q $2"

	rewrite_description = _("Gives you or a specified nick owner status on a channel")
}
command
{
	service = "ChanServ"; name = "DEOWNER"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "DEOWNER $"
	rewrite_target = "MODE $1 SET -q $2"

	rewrite_description = _("Removes owner status from you or a specified nick on a channel")
}

/* PROTECT and DEPROTECT commands */
command
{
	service = "ChanServ"; name = "PROTECT"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "PROTECT $"
	rewrite_target = "MODE $1 SET +a $2"

	rewrite_description = _("Protects you or a specified nick on a channel")
}
command
{
	service = "ChanServ"; name = "DEPROTECT"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "DEPROTECT $"
	rewrite_target = "MODE $1 SET -a $2"

	rewrite_description = _("Deprotects you or a specified nick on a channel")
}

/* OP and DEOP commands */
command
{
	service = "ChanServ"; name = "OP"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "OP $"
	rewrite_target = "MODE $1 SET +o $2"

	rewrite_description = _("Gives operator status to you or a specified nick on a channel")
}
command
{
	service = "ChanServ"; name = "DEOP"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "DEOP $"
	rewrite_target = "MODE $1 SET -o $2";

	rewrite_description = _("Deops you or a specified nick on a channel")
}

/* HALFOP and DEHALFOP commands */
command
{
	service = "ChanServ"; name = "HALFOP"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "HALFOP $"
	rewrite_target = "MODE $1 SET +h $2"

	rewrite_description = _("Halfops you or a specified nick on a channel")

}
command
{
	service = "ChanServ"; name = "DEHALFOP"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "DEHALFOP $"
	rewrite_target = "MODE $1 SET -h $2"

	rewrite_description = _("Dehalfops you or a specified nick on a channel")
}

/* VOICE and DEVOICE commands */
command
{
	service = "ChanServ"; name = "VOICE"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "VOICE $"
	rewrite_target = "MODE $1 SET +v $2"

	rewrite_description = _("Voices you or a specified nick on a channel")
}
command
{
	service = "ChanServ"; name = "DEVOICE"; command = "rewrite"; group = "chanserv/status"

	rewrite = true
	rewrite_source = "DEVOICE $"
	rewrite_target = "MODE $1 SET -v $2"

	rewrite_description = _("Devoices you or a specified nick on a channel")
}


/*
 * Extra ChanServ related modules.
 */

/*
 * cs_statusupdate
 *
 * This module automatically updates users status on channels when the
 * channel's access list is modified.
 */
module { name = "cs_statusupdate" }
