Add a ServiceList section to Robust .ini to get rid of the long string

connector_plugin
Melanie 2012-10-08 17:57:22 +01:00
parent 90a39379f0
commit ff92330523
1 changed files with 18 additions and 0 deletions

View File

@ -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<string> servicesList = new List<string>();
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;