/*
 * Example configuration file for HostServ.
 */

/*
 * 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 HostServ client.
	 */
	nick = "HostServ"

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

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

	/*
	 * The realname of the HostServ client.
	 */
	gecos = "vHost 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 HostServ module.
 *
 * Provides essential functionality for HostServ.
 */
module { name = "hostserv" }

/*
 * Configuration for HostServ provided by hs_main.
 */
hostserv
{
	/*
	 * The name of the client that should be HostServ.
	 */
	name = "HostServ"

	/*
	 * The characters allowed in a vHost. Changing this is not recommended unless
	 * you know for sure your IRCd supports whatever characters you are wanting to use.
	 * Telling services to set a vHost containing characters your IRCd disallows could
	 * potentially break the IRCd and/or Services. Note these are 1 byte characters, so
	 * UTF-8 characters will not work.
	 *
	 * It is recommended you DON'T change this.
	 */
	vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"

	/*
	 * If set to true, allows vHosts to not contain dots (.).
	 * Newer IRCds generally do not have a problem with this, but the same warning as
	 * vhost_chars applies.
	 *
	 * It is recommended you DON'T change this.
	 */
	allow_undotted_vhosts = false

	/*
	 * The characters that are not allowed to be at the very beginning or very ending
	 * of a vHost. The same warning as vhost_chars applies.
	 *
	 * It is recommended you DON'T change this.
	 */
	disallow_start_or_end = ".-"
}

/*
 * Core HostServ 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.
 */

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

/*
 * hs_del
 *
 * Provides the commands hostserv/del and hostserv/delall.
 *
 * Used for removing users' vHosts.
 */
module { name = "hs_del" }
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del"; }
command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; permission = "hostserv/del"; }

/*
 * hs_group
 *
 * Provides the command hostserv/group.
 *
 * Used for grouping one vHost to many nicks.
 */
module { name = "hs_group" }
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }

/*
 * hs_list
 *
 * Provides the command hostserv/list.
 *
 * Used for listing actively set vHosts.
 */
module { name = "hs_list" }
command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permission = "hostserv/list"; }

/*
 * hs_off
 *
 * Provides the command hostserv/off.
 *
 * Used for turning off your vHost.
 */
module { name = "hs_off" }
command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }

/*
 * hs_on
 *
 * Provides the command hostserv/on.
 *
 * Used for turning on your vHost.
 */
module { name = "hs_on" }
command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }

/*
 * hs_request
 *
 * Provides the commands hostserv/request, hostserv/active, hostserv/reject, and hostserv/waiting.
 *
 * Used to manage vHosts requested by users.
 */
module { name = "hs_request" }
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
hs_request
{
	/*
	 * If set, Services will send a memo to the user requesting a vHost when it's been
	 * approved or rejected.
	 */
	#memouser = yes

	/*
	 * If set, Services will send a memo to all Services staff when a new vHost is requested.
	 */
	#memooper = yes
}

/*
 * hs_set
 *
 * Provides the commands hostserv/set and hostserv/setall.
 *
 * Used for setting users' vHosts.
 */
module { name = "hs_set" }
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "SETALL"; command = "hostserv/setall"; permission = "hostserv/set"; }
