Fix godnames module to not add the empty string if only one option is used
parent
d6723dab37
commit
34209d2a39
|
@ -66,19 +66,25 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
|
||||||
m_log.Info("[GODNAMES]: Enabled");
|
m_log.Info("[GODNAMES]: Enabled");
|
||||||
m_enabled = true;
|
m_enabled = true;
|
||||||
string conf_str = moduleConfig.GetString("FullNames", String.Empty);
|
string conf_str = moduleConfig.GetString("FullNames", String.Empty);
|
||||||
|
if (conf_str != String.Empty)
|
||||||
|
{
|
||||||
foreach (string strl in conf_str.Split(',')) {
|
foreach (string strl in conf_str.Split(',')) {
|
||||||
string strlan = strl.Trim(" \t".ToCharArray());
|
string strlan = strl.Trim(" \t".ToCharArray());
|
||||||
m_log.DebugFormat("[GODNAMES]: Adding {0} as a God name", strlan);
|
m_log.DebugFormat("[GODNAMES]: Adding {0} as a God name", strlan);
|
||||||
m_fullNames.Add(strlan);
|
m_fullNames.Add(strlan);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
conf_str = moduleConfig.GetString("Surnames", String.Empty);
|
conf_str = moduleConfig.GetString("Surnames", String.Empty);
|
||||||
|
if (conf_str != String.Empty)
|
||||||
|
{
|
||||||
foreach (string strl in conf_str.Split(',')) {
|
foreach (string strl in conf_str.Split(',')) {
|
||||||
string strlan = strl.Trim(" \t".ToCharArray());
|
string strlan = strl.Trim(" \t".ToCharArray());
|
||||||
m_log.DebugFormat("[GODNAMES]: Adding {0} as a God last name", strlan);
|
m_log.DebugFormat("[GODNAMES]: Adding {0} as a God last name", strlan);
|
||||||
m_lastNames.Add(strlan);
|
m_lastNames.Add(strlan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene scene) {
|
public void AddRegion(Scene scene) {
|
||||||
/*no op*/
|
/*no op*/
|
||||||
|
|
Loading…
Reference in New Issue