	SurrealServices is a full replacement for services like
Auspice or Anope, offering NickServ, ChanServ, MemoServ,
BotServ, OperServ. But it is more than that, it also has a
plugin/module system akin to NeoStats. Additionally it is
multithreaded to eliminate the problems with timers not expiring
properly as well as not block everything on a complex or slow
database query.

	Be sure to read through the CONFIG section of this file
as services will not work properly if not configured correctly.

------
CONFIG
------

**main.conf**

- local = services.example.com

	this is the name for the services-server. it MUST
contain at least ONE dot per RFC1459.

- remote = hub.example.com

	This is the name or IP of the IRC-server/Hub that
services will be connecting to. it is recommended that services
be hosted on the same box as the hub, or at least the same local
network.

- port = 6667

	This is the port on the remote IRC-server/Hub. this port
must accept server connections (cannot be 'clientonly'). Nor can
it be an SSL port. Services does not support ziplinks directly
either. Hence why you must use a local hub.

- numeric = 123

	This is an Unreal specific feature, the same as the
numeric in a me{} block. must be unique across the entire
ircnet.

- info = SurrealServices

	also a field from the me{} block.

- pass = mypass

	Server Link pass. must match the appropriate link{}
block in the ircd config.

- procs = 4

	Number of worker threads. scale this to number of users
and the load on your network.

- diag = #Diagnostics

	Diagnostic channel. Where all the connects, disconnects,
registrations, identifies, etc go. It is recommended that this
channel be restricted to network staff only as it will contain
sensitive data.

- load = core, services, securitybot

	Module load list. core is required. any other modules
are optional, but may have dependencies. Modules are loaded in
the order they are specified.

	logserv is recommended to be loaded right after core,
as it has NO other module dependencies, and should preferably
see all events FIRST.

	country requires that it be loaded AFTER services, and
further requires that you run country-table.pl first before
using it, as it requires a (non-static) table for operation.
Current recommended is country-table2.pl, as country-table3's
mirror is down, and country-table.pl's system is quite slow and
sometimes unreliable. It is further recommended that you run
the updater daily in crontab.

	connectserv no longer depends on services (as of
0.3.13.1) and may be loaded in any order. It may work best if
loaded before services.

- netname = ExampleNet

	This is probably a deprecated config option, as it will
be picked up during the connect phase.

- email = Example IRC Services <services@example.com>

	This is the email address that services will use for
nearexpire, sendpass, etc.

- replyto = staff@example.com

	This is the Reply-To: field, and there must be actual
humans behind this. It may be a role-acct or a mailing list.

- sig = Thank you for chatting with us.

	This is another email-related field, used at the end of
automatically generated emails like nearexpire, sendpass, etc.

- unsyncserver = neostats.example.com

	This field is a workaround for services/servers that do
not send EOS when they finish syncing. NeoStats is one example.

- nomail = 0

	If this is set to any value other than 0, no emails
will be sent. This includes SENDPASS. Mostly useful for debug
environments or on systems that don't have a working
sendmail/MTA.

- server_prepare = 1

	enables DBD::mysql mysql_server_prepare. Speeds up the
processing of ->prepare but can cause problems with some
versions of the DBI/DBD.

------

**services.conf**


- mysql-user = services

	This is the name of the mysql user that is used to connect
to the mysql db.

- mysql-pass = mypass

	Similarly, this is the pass used to authenticate to the MySQL db.

- mysql-db = services

	And this is the db that is then used.

- noexpire = 0

	This is a boolean flag that determines if the services
expire routines are run. Especially useful after a long-term
downtime where you want to give ppl a couple days to come back
and renew their nicknames.

- nickexpire = 21

	This is the number of days until a nick expires from
disuse.

- vacationexpire = 90

	This is the number of days that a nick can remain in
vacation mode until it will also expire.

- nearexpire = 7

	Number of days BEFORE normal expiration where services
will send a reminder to the owner of the nick to come and
identify or it will expire.
	If set to 0, then nearexpire will not be used/run.

- chanexpire = 21

	This is the number of days until a chan expires from
disuse. use is defined as someone with channel-access joining
and being opped. Also if the founder and successor nicks expire
the channel will expire.

- memoexpire = 30

	This flag is currently unused, but is intended to expire
old memos.

- validate-email = 0

	This enables/disables email verification for nick
registration, which sends an email with a code to
validate/verify that the email address is valid and belongs to
them.

- validate-expire = 0

	Determines how many days until a non-validated
nick-registration automatically drops.

- clone-limit = 3

	Maximum number of connections from the same IP w/o
having an Exception entry.

- chankilltime = 86400

	Time in seconds for a drone gline or other automated
server-ban. 86400 is one day.


- default-protect = normal

	If this value is defined, then it will be the default
setting for NS SET PROTECT. Some networks might want to have
protect default OFF, or default HIGH (private networks for
example). default KILL is dangerous, do NOT set it to KILL.
