<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ADCHubPlusPlus>

<!-- IMPORTANT: under Linux, you should use absolute paths in the various path settings 
	of this configuration file -->

	<Settings>

<!-- Hub name and message of the day -->
		<!-- This is the name of the hub as it should be reported to the clients during
			 login and to the hub registration services. -->
		<HubName type="string">ADCH++</HubName>
		<Description type="string">ADCH++ Test hub</Description>

<!-- Logging -->
		<!-- Enable/disable logging -->
		<Log type="int">1</Log>

		<!-- Logging, when enabled, is done to this file. The filename is first passed
			 through strftime with the current time (see any standard c library reference
			 to find out what works...). There's not much logging done at all btw, but
			 plugins can use the logs as well... -->
		<LogFile type="string">logs/adchpp%Y%m.log</LogFile>

<!-- Advanced connection settings (don't change unless you at least think you know what you're doing) -->

		<!-- Maximum send size, changes how much data is sent at most to a single user per
			 call to the socket api. Experiment with this, lower settings might be more fair
			 in the distribution of available bandwidth at the cost of network/cpu efficiency.
			 Don't set below 256, 0 = disable. Experiment with this, it has many strange effects! -->
		<!-- TODO this setting is currently ignored.
		<MaxSendSize type="int">1400</MaxSendSize>
		-->

		<MaxCommandSize type="int">16384</MaxCommandSize>

		<!-- Buffer size, this is the minimum buffer size that is initially assigned to
			 each user. Larger buffer = more memory usage / user, less = a little bit
			 slower performance if the user sends more than these many bytes at a time
			 (in a chat message for instance...). Don't set to lower than 256. -->
		<BufferSize type="int">1024</BufferSize>
		<MaxBufferSize type="int">16384</MaxBufferSize>

		<!-- Milliseconds before a user is disconnected when his/her outgoing buffer
			 becomes larger than MaxRecvSize (outgoing buffer overflow). -->
		<OverflowTimeout type="int">60000</OverflowTimeout>

		<!-- Timeout (ms) before ADCH++ stops trying to empty its send buffer for a user
			 (to send a kick message for example), and disconnects him/her. -->
		<DisconnectTimeout>10000</DisconnectTimeout>

		<!-- Timeout (ms) before disconnecting users whose login process is taking too long. -->
		<LogTimeout>10000</LogTimeout>
		
		<!-- Timeout (ms) before aborting validation for the secondary IP protocol. 
			 The login procedure will continue normally with the primary IP protocol then. -->
		<HbriTimeout>3000</HbriTimeout>
	</Settings>

	<Servers>
		<!--
		One <Server> tag per listening connection.

		To create secure connections, set TLS="1" and define the following (preferably absolute)
		paths: Certificate, PrivateKey, TrustedPath, DHParams. An example secure server setting:
		<Server Port="2780" TLS="1" Certificate="certs/cacert.pem" PrivateKey="certs/privkey.pem" TrustedPath="certs/trusted/" DHParams="certs/dhparam.pem" BindAddress4="0.0.0.0" BindAddress6="::"/>

		Simple OpenSSL commands to generate files used for secure connections:
		openssl genrsa -out privkey.pem 2048
		openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
		openssl dhparam -outform PEM -out dhparam.pem 1024
		
		Alternatively, you can use the cert generator contributed on
		<http://launchpadlibrarian.net/31960965/Cert_Generator.7z>.
		
		To allow hybrid connectivity, add address fields for the used protocols: HubAddress4 and HubAddress6. You may also use the same 
		DNS entry for both if it has A and AAAA records. You may also use plain IP addresses.
		Example:
		<Server Port="2780" HubAddress4="mydomain4.net" HubAddress6="mydomain6.net"/>
		
		Bind addresses may be set with: BindAddress4 and BindAddress6 (connections will be accepted for both protocols if none is set)

		-->
		<Server Port="2782"/>
	</Servers>

	<!-- Instead of scripts, ADCH++ uses plugins. Plugins can do the same work
		 as scripts, are more difficult to write, but when it comes to performance,
		 the difference between the two is absurd. This way, it's also possible to
		 write a script plugin, enabling people to choose their own script language,
		 if someone's written a script plugin for it. You must specify the path to your
		 plugins in linux default place it looks for the plugin path is /home/<username>/adchpp/ -->
		 
	<!--Plugins Path="~/adchpp/"-->
	
	<Plugins>
		<!-- This plugins provides the scripting support. -->
		<Plugin>Script</Plugin>
		<!-- Bloom filter plugin, helps save upload bandwidth at a slight expense of memory and download bandwidth -->
		<Plugin>Bloom</Plugin>
	</Plugins>
</ADCHubPlusPlus>
