breakdown of config.xml

Post here your suggestions for new possible features in SmartFoxServer.

Moderators: Lapo, Bax

Post Reply
amenthes
Posts: 35
Joined: 22 Oct 2008, 11:55

breakdown of config.xml

Post by amenthes »

Hi there,

I really wish, i could break my config.xml into tiny pieces. There are large parts which will be the same across servers and other parts which will be (slightly) different.

I wish i could do something like in the apache-configuration, where you specify another file to be included at this point (or even a whole folder using a wildcard).

This would also improve readability.

Then i could have a config like this:

Code: Select all

<!-- config.xml -->
<SmartFoxConfig>
  <ServerSetup>
    <include file="thisMachine.xml" />
    <LogMaxSize>5000000</LogMaxSize>
    <!-- other general stuff -->
  </ServerSetup>
  <Zones>
    <include file="zones/server01/*.xml" />
  </Zones>
</SmartFoxConfig>

Code: Select all

<!-- thisMachine.xml -->
<included>
  <ServerIP>*</ServerIP>
  <ServerPort>9339</ServerPort>
  <AutoSendPolicyFile>true</AutoSendPolicyFile>
</included>

Code: Select all

<!-- zones/server01/myzone.xml -->
<included>
  <Zone name="The-Zone" maxUsers="100">
    <Rooms><!-- all my stuff --></Rooms>
    <Extensions><!-- even more stuff --></Extensions>
  </Zone>
</included>
and so on.

The "included"-Tag is just to keep the xml valid, i could very well live without it.
Post Reply