diff options
author | Justin Clark-Casey (justincc) | 2013-11-15 21:45:08 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-11-15 21:45:08 +0000 |
commit | 7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9 (patch) | |
tree | 24a0c3d086944436431ccae6302cd7cc0ffa8407 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups | |
parent | If a local land ID is given to the "land show" command, then output to consol... (diff) | |
download | opensim-SC_OLD-7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9.zip opensim-SC_OLD-7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9.tar.gz opensim-SC_OLD-7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9.tar.bz2 opensim-SC_OLD-7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9.tar.xz |
refactor: replace verbose checks with String.IsNullOrEmpty where applicable.
Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups')
2 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 7bae8f7..8095b28 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | |||
@@ -212,8 +212,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
212 | m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR]: Initializing {0}", this.Name); | 212 | m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR]: Initializing {0}", this.Name); |
213 | 213 | ||
214 | m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); | 214 | m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); |
215 | if ((m_groupsServerURI == null) || | 215 | if (string.IsNullOrEmpty(m_groupsServerURI)) |
216 | (m_groupsServerURI == string.Empty)) | ||
217 | { | 216 | { |
218 | m_log.ErrorFormat("Please specify a valid Simian Server for GroupsServerURI in OpenSim.ini, [Groups]"); | 217 | m_log.ErrorFormat("Please specify a valid Simian Server for GroupsServerURI in OpenSim.ini, [Groups]"); |
219 | m_connectorEnabled = false; | 218 | m_connectorEnabled = false; |
@@ -438,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
438 | return null; | 437 | return null; |
439 | } | 438 | } |
440 | } | 439 | } |
441 | else if ((groupName != null) && (groupName != string.Empty)) | 440 | else if (!string.IsNullOrEmpty(groupName)) |
442 | { | 441 | { |
443 | if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) | 442 | if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) |
444 | { | 443 | { |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 71b24ac..e28d0c2 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -168,8 +168,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
168 | m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name); | 168 | m_log.DebugFormat("[XMLRPC-GROUPS-CONNECTOR]: Initializing {0}", this.Name); |
169 | 169 | ||
170 | m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); | 170 | m_groupsServerURI = groupsConfig.GetString("GroupsServerURI", string.Empty); |
171 | if ((m_groupsServerURI == null) || | 171 | if (string.IsNullOrEmpty(m_groupsServerURI)) |
172 | (m_groupsServerURI == string.Empty)) | ||
173 | { | 172 | { |
174 | m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]"); | 173 | m_log.ErrorFormat("Please specify a valid URL for GroupsServerURI in OpenSim.ini, [Groups]"); |
175 | m_connectorEnabled = false; | 174 | m_connectorEnabled = false; |
@@ -354,7 +353,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
354 | { | 353 | { |
355 | param["GroupID"] = GroupID.ToString(); | 354 | param["GroupID"] = GroupID.ToString(); |
356 | } | 355 | } |
357 | if ((GroupName != null) && (GroupName != string.Empty)) | 356 | if (!string.IsNullOrEmpty(GroupName)) |
358 | { | 357 | { |
359 | param["Name"] = GroupName.ToString(); | 358 | param["Name"] = GroupName.ToString(); |
360 | } | 359 | } |