diff options
author | Melanie | 2019-07-27 12:12:35 +0100 |
---|---|---|
committer | Melanie | 2019-07-27 12:12:35 +0100 |
commit | 34209d2a397ddc0be99ff314a89c2a4b10e47d7c (patch) | |
tree | 568ba57835e85f6a2f856e339dba225dd8594123 /OpenSim/Region | |
parent | Merge branch 'master' of brain.opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-34209d2a397ddc0be99ff314a89c2a4b10e47d7c.zip opensim-SC-34209d2a397ddc0be99ff314a89c2a4b10e47d7c.tar.gz opensim-SC-34209d2a397ddc0be99ff314a89c2a4b10e47d7c.tar.bz2 opensim-SC-34209d2a397ddc0be99ff314a89c2a4b10e47d7c.tar.xz |
Fix godnames module to not add the empty string if only one option is used
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs index 8ed0bb3..b2dc2e1 100644 --- a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs +++ b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs | |||
@@ -66,17 +66,23 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport | |||
66 | m_log.Info("[GODNAMES]: Enabled"); | 66 | m_log.Info("[GODNAMES]: Enabled"); |
67 | m_enabled = true; | 67 | m_enabled = true; |
68 | string conf_str = moduleConfig.GetString("FullNames", String.Empty); | 68 | string conf_str = moduleConfig.GetString("FullNames", String.Empty); |
69 | foreach (string strl in conf_str.Split(',')) { | 69 | if (conf_str != String.Empty) |
70 | string strlan = strl.Trim(" \t".ToCharArray()); | 70 | { |
71 | m_log.DebugFormat("[GODNAMES]: Adding {0} as a God name", strlan); | 71 | foreach (string strl in conf_str.Split(',')) { |
72 | m_fullNames.Add(strlan); | 72 | string strlan = strl.Trim(" \t".ToCharArray()); |
73 | m_log.DebugFormat("[GODNAMES]: Adding {0} as a God name", strlan); | ||
74 | m_fullNames.Add(strlan); | ||
75 | } | ||
73 | } | 76 | } |
74 | 77 | ||
75 | conf_str = moduleConfig.GetString("Surnames", String.Empty); | 78 | conf_str = moduleConfig.GetString("Surnames", String.Empty); |
76 | foreach (string strl in conf_str.Split(',')) { | 79 | if (conf_str != String.Empty) |
77 | string strlan = strl.Trim(" \t".ToCharArray()); | 80 | { |
78 | m_log.DebugFormat("[GODNAMES]: Adding {0} as a God last name", strlan); | 81 | foreach (string strl in conf_str.Split(',')) { |
79 | m_lastNames.Add(strlan); | 82 | string strlan = strl.Trim(" \t".ToCharArray()); |
83 | m_log.DebugFormat("[GODNAMES]: Adding {0} as a God last name", strlan); | ||
84 | m_lastNames.Add(strlan); | ||
85 | } | ||
80 | } | 86 | } |
81 | } | 87 | } |
82 | 88 | ||