From ff92330523a3375b88dca017ed56d52e0859b561 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 8 Oct 2012 17:57:22 +0100 Subject: Add a ServiceList section to Robust .ini to get rid of the long string --- OpenSim/Server/ServerMain.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Server/ServerMain.cs b/OpenSim/Server/ServerMain.cs index 365a79a..552e3a2 100644 --- a/OpenSim/Server/ServerMain.cs +++ b/OpenSim/Server/ServerMain.cs @@ -60,6 +60,24 @@ namespace OpenSim.Server } string connList = serverConfig.GetString("ServiceConnectors", String.Empty); + + IConfig servicesConfig = m_Server.Config.Configs["ServiceList"]; + if (servicesConfig != null) + { + List servicesList = new List(); + if (connList != String.Empty) + servicesList.Add(connList); + + foreach (string k in servicesConfig.GetKeys()) + { + string v = servicesConfig.GetString(k); + if (v != String.Empty) + servicesList.Add(v); + } + + connList = servicesConfig.Join(","); + } + string[] conns = connList.Split(new char[] {',', ' ', '\n', '\r', '\t'}); // int i = 0; -- cgit v1.1