aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2013-11-15 14:56:13 -0800
committerRobert Adams2013-11-15 14:56:13 -0800
commit604b39cea908029c80aa8ee5ff3aee5c8000c0e4 (patch)
treebea875d6651531a030630e161b658c74d3aaf357 /OpenSim
parentMerge branch 'master' into varregion (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-604b39cea908029c80aa8ee5ff3aee5c8000c0e4.zip
opensim-SC-604b39cea908029c80aa8ee5ff3aee5c8000c0e4.tar.gz
opensim-SC-604b39cea908029c80aa8ee5ff3aee5c8000c0e4.tar.bz2
opensim-SC-604b39cea908029c80aa8ee5ff3aee5c8000c0e4.tar.xz
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs4
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs2
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs2
-rw-r--r--OpenSim/Framework/Configuration/XML/XmlConfiguration.cs2
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs2
-rw-r--r--OpenSim/Framework/Monitoring/Stats/Stat.cs6
-rw-r--r--OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs2
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs2
-rw-r--r--OpenSim/Framework/WebUtil.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs6
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs178
-rw-r--r--OpenSim/Region/DataSnapshot/DataSnapshotManager.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs2
-rw-r--r--OpenSim/Services/HypergridService/HGInventoryService.cs2
30 files changed, 170 insertions, 100 deletions
diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs
index 59fec6f..653dbac 100644
--- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs
+++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnector.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Groups
101 Dictionary<string, object> sendData = new Dictionary<string, object>(); 101 Dictionary<string, object> sendData = new Dictionary<string, object>();
102 if (GroupID != UUID.Zero) 102 if (GroupID != UUID.Zero)
103 sendData["GroupID"] = GroupID.ToString(); 103 sendData["GroupID"] = GroupID.ToString();
104 if (GroupName != null && GroupName != string.Empty) 104 if (!string.IsNullOrEmpty(GroupName))
105 sendData["Name"] = GroupsDataUtils.Sanitize(GroupName); 105 sendData["Name"] = GroupsDataUtils.Sanitize(GroupName);
106 106
107 sendData["RequestingAgentID"] = RequestingAgentID; 107 sendData["RequestingAgentID"] = RequestingAgentID;
@@ -275,7 +275,7 @@ namespace OpenSim.Groups
275 275
276 //m_log.DebugFormat("[XXX]: reply was {0}", reply); 276 //m_log.DebugFormat("[XXX]: reply was {0}", reply);
277 277
278 if (reply == string.Empty || reply == null) 278 if (string.IsNullOrEmpty(reply))
279 return null; 279 return null;
280 280
281 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( 281 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
index 161ca0c..ed41978 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Groups
120 Dictionary<string, object> sendData = new Dictionary<string, object>(); 120 Dictionary<string, object> sendData = new Dictionary<string, object>();
121 if (GroupID != UUID.Zero) 121 if (GroupID != UUID.Zero)
122 sendData["GroupID"] = GroupID.ToString(); 122 sendData["GroupID"] = GroupID.ToString();
123 if (GroupName != null && GroupName != string.Empty) 123 if (!string.IsNullOrEmpty(GroupName))
124 sendData["Name"] = GroupsDataUtils.Sanitize(GroupName); 124 sendData["Name"] = GroupsDataUtils.Sanitize(GroupName);
125 125
126 sendData["RequestingAgentID"] = RequestingAgentID; 126 sendData["RequestingAgentID"] = RequestingAgentID;
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 789bf2b..7b3124a 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Capabilities.Handlers
85// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID); 85// m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID);
86 86
87 string[] formats; 87 string[] formats;
88 if (format != null && format != string.Empty) 88 if (!string.IsNullOrEmpty(format))
89 { 89 {
90 formats = new string[1] { format.ToLower() }; 90 formats = new string[1] { format.ToLower() };
91 } 91 }
diff --git a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
index 43162fc..3152a7d 100644
--- a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
+++ b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Configuration.XML
121 121
122 public void Commit() 122 public void Commit()
123 { 123 {
124 if (fileName == null || fileName == String.Empty) 124 if (string.IsNullOrEmpty(fileName))
125 return; 125 return;
126 126
127 if (!Directory.Exists(Util.configDir())) 127 if (!Directory.Exists(Util.configDir()))
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 3d45e76..558dfd0 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Framework
122 { 122 {
123 get 123 get
124 { 124 {
125 if (m_creatorData != null && m_creatorData != string.Empty) 125 if (!string.IsNullOrEmpty(m_creatorData))
126 return m_creatorId + ';' + m_creatorData; 126 return m_creatorId + ';' + m_creatorData;
127 else 127 else
128 return m_creatorId; 128 return m_creatorId;
diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs
index 2b34493..e095801 100644
--- a/OpenSim/Framework/Monitoring/Stats/Stat.cs
+++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Monitoring
231 Container, 231 Container,
232 ShortName, 232 ShortName,
233 Value, 233 Value,
234 UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); 234 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
235 235
236 AppendMeasuresOfInterest(sb); 236 AppendMeasuresOfInterest(sb);
237 237
@@ -316,9 +316,9 @@ namespace OpenSim.Framework.Monitoring
316 sb.AppendFormat( 316 sb.AppendFormat(
317 ", {0:0.##}{1}/s, {2:0.##}{3}/s", 317 ", {0:0.##}{1}/s, {2:0.##}{3}/s",
318 lastChangeOverTime, 318 lastChangeOverTime,
319 UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName), 319 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName),
320 averageChangeOverTime, 320 averageChangeOverTime,
321 UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); 321 string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
322 } 322 }
323 } 323 }
324 } 324 }
diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
index 88f9581..f2a6b8b 100644
--- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs
@@ -277,7 +277,7 @@ namespace OpenSim.Framework.Serialization.External
277 writer.WriteStartElement("GroupOwned"); 277 writer.WriteStartElement("GroupOwned");
278 writer.WriteString(inventoryItem.GroupOwned.ToString()); 278 writer.WriteString(inventoryItem.GroupOwned.ToString());
279 writer.WriteEndElement(); 279 writer.WriteEndElement();
280 if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty) 280 if (options.ContainsKey("creators") && !string.IsNullOrEmpty(inventoryItem.CreatorData))
281 writer.WriteElementString("CreatorData", inventoryItem.CreatorData); 281 writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
282 else if (options.ContainsKey("home")) 282 else if (options.ContainsKey("home"))
283 { 283 {
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 76b4257..e1ae74e 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -785,7 +785,7 @@ namespace OpenSim.Framework.Servers.HttpServer
785 "[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}", 785 "[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}",
786 RequestNumber, 786 RequestNumber,
787 Port, 787 Port,
788 (request.ContentType == null || request.ContentType == "") ? "not set" : request.ContentType, 788 string.IsNullOrEmpty(request.ContentType) ? "not set" : request.ContentType,
789 request.HttpMethod, 789 request.HttpMethod,
790 request.Url.PathAndQuery, 790 request.Url.PathAndQuery,
791 request.RemoteIPEndPoint); 791 request.RemoteIPEndPoint);
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index a06f8e7..307cb75 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Framework
124 { 124 {
125 get 125 get
126 { 126 {
127 if (_creatorData != null && _creatorData != string.Empty) 127 if (!string.IsNullOrEmpty(_creatorData))
128 return _creatorID.ToString() + ';' + _creatorData; 128 return _creatorID.ToString() + ';' + _creatorData;
129 else 129 else
130 return _creatorID.ToString(); 130 return _creatorID.ToString();
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 706b33f..bcf6af8 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -720,7 +720,7 @@ namespace OpenSim.Framework
720 /// <returns></returns> 720 /// <returns></returns>
721 public static string[] GetPreferredImageTypes(string accept) 721 public static string[] GetPreferredImageTypes(string accept)
722 { 722 {
723 if (accept == null || accept == string.Empty) 723 if (string.IsNullOrEmpty(accept))
724 return new string[0]; 724 return new string[0];
725 725
726 string[] types = accept.Split(new char[] { ',' }); 726 string[] types = accept.Split(new char[] { ',' });
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 70d7ee9..7e7f42e 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -909,7 +909,7 @@ namespace OpenSim
909 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true); 909 regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
910 910
911 string newName; 911 string newName;
912 if (estateName != null && estateName != "") 912 if (!string.IsNullOrEmpty(estateName))
913 newName = estateName; 913 newName = estateName;
914 else 914 else
915 newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); 915 newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 31c42d8..f7057fe 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -421,7 +421,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
421 item.CreatorId = ospResolvedId.ToString(); 421 item.CreatorId = ospResolvedId.ToString();
422 item.CreatorData = string.Empty; 422 item.CreatorData = string.Empty;
423 } 423 }
424 else if (item.CreatorData == null || item.CreatorData == String.Empty) 424 else if (string.IsNullOrEmpty(item.CreatorData))
425 { 425 {
426 item.CreatorId = m_userInfo.PrincipalID.ToString(); 426 item.CreatorId = m_userInfo.PrincipalID.ToString();
427// item.CreatorIdAsUuid = new UUID(item.CreatorId); 427// item.CreatorIdAsUuid = new UUID(item.CreatorId);
@@ -522,7 +522,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
522 522
523 foreach (SceneObjectGroup sog in sceneObjects) 523 foreach (SceneObjectGroup sog in sceneObjects)
524 foreach (SceneObjectPart sop in sog.Parts) 524 foreach (SceneObjectPart sop in sog.Parts)
525 if (sop.CreatorData == null || sop.CreatorData == "") 525 if (string.IsNullOrEmpty(sop.CreatorData))
526 sop.CreatorID = m_creatorIdForAssetId[assetId]; 526 sop.CreatorID = m_creatorIdForAssetId[assetId];
527 527
528 if (coa != null) 528 if (coa != null)
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index 144895c..b7a4d1a 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
174 174
175 private void AdjustIdentifiers(AssetMetadata meta) 175 private void AdjustIdentifiers(AssetMetadata meta)
176 { 176 {
177 if (meta.CreatorID != null && meta.CreatorID != string.Empty) 177 if (!string.IsNullOrEmpty(meta.CreatorID))
178 { 178 {
179 UUID uuid = UUID.Zero; 179 UUID uuid = UUID.Zero;
180 UUID.TryParse(meta.CreatorID, out uuid); 180 UUID.TryParse(meta.CreatorID, out uuid);
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index d3926cc..3fb5195 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -466,7 +466,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
466 return userdata.ServerURLs[serverType].ToString(); 466 return userdata.ServerURLs[serverType].ToString();
467 } 467 }
468 468
469 if (userdata.HomeURL != null && userdata.HomeURL != string.Empty) 469 if (!string.IsNullOrEmpty(userdata.HomeURL))
470 { 470 {
471 //m_log.DebugFormat( 471 //m_log.DebugFormat(
472 // "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}", 472 // "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}",
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
552 552
553 if (oldUser != null) 553 if (oldUser != null)
554 { 554 {
555 if (creatorData == null || creatorData == String.Empty) 555 if (string.IsNullOrEmpty(creatorData))
556 { 556 {
557 //ignore updates without creator data 557 //ignore updates without creator data
558 return; 558 return;
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 1a62405..c3a8afd 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -460,9 +460,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
460 Request.Headers.Add(HttpCustomHeaders[i], 460 Request.Headers.Add(HttpCustomHeaders[i],
461 HttpCustomHeaders[i+1]); 461 HttpCustomHeaders[i+1]);
462 } 462 }
463 if (proxyurl != null && proxyurl.Length > 0) 463 if (!string.IsNullOrEmpty(proxyurl))
464 { 464 {
465 if (proxyexcepts != null && proxyexcepts.Length > 0) 465 if (!string.IsNullOrEmpty(proxyexcepts))
466 { 466 {
467 string[] elist = proxyexcepts.Split(';'); 467 string[] elist = proxyexcepts.Split(';');
468 Request.Proxy = new WebProxy(proxyurl, true, elist); 468 Request.Proxy = new WebProxy(proxyurl, true, elist);
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
483 } 483 }
484 484
485 // Encode outbound data 485 // Encode outbound data
486 if (OutboundBody != null && OutboundBody.Length > 0) 486 if (!string.IsNullOrEmpty(OutboundBody))
487 { 487 {
488 byte[] data = Util.UTF8.GetBytes(OutboundBody); 488 byte[] data = Util.UTF8.GetBytes(OutboundBody);
489 489
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 65737fa..baf9f2f 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -161,9 +161,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
161 { 161 {
162 WebRequest request = HttpWebRequest.Create(url); 162 WebRequest request = HttpWebRequest.Create(url);
163 163
164 if (m_proxyurl != null && m_proxyurl.Length > 0) 164 if (!string.IsNullOrEmpty(m_proxyurl))
165 { 165 {
166 if (m_proxyexcepts != null && m_proxyexcepts.Length > 0) 166 if (!string.IsNullOrEmpty(m_proxyexcepts))
167 { 167 {
168 string[] elist = m_proxyexcepts.Split(';'); 168 string[] elist = m_proxyexcepts.Split(';');
169 request.Proxy = new WebProxy(m_proxyurl, true, elist); 169 request.Proxy = new WebProxy(m_proxyurl, true, elist);
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
index cbffca7..c6e05b1 100644
--- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -677,7 +677,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
677 // if not, use as method name 677 // if not, use as method name
678 UUID parseUID; 678 UUID parseUID;
679 string mName = "llRemoteData"; 679 string mName = "llRemoteData";
680 if ((Channel != null) && (Channel != "")) 680 if (!string.IsNullOrEmpty(Channel))
681 if (!UUID.TryParse(Channel, out parseUID)) 681 if (!UUID.TryParse(Channel, out parseUID))
682 mName = Channel; 682 mName = Channel;
683 else 683 else
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index 58576d1..77a3c82 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
259 if (sp == null) 259 if (sp == null)
260 { 260 {
261 inventoryURL = UserManagementModule.GetUserServerURL(userID, "InventoryServerURI"); 261 inventoryURL = UserManagementModule.GetUserServerURL(userID, "InventoryServerURI");
262 if (inventoryURL != null && inventoryURL != string.Empty) 262 if (!string.IsNullOrEmpty(inventoryURL))
263 { 263 {
264 inventoryURL = inventoryURL.Trim(new char[] { '/' }); 264 inventoryURL = inventoryURL.Trim(new char[] { '/' });
265 m_InventoryURLs.Add(userID, inventoryURL); 265 m_InventoryURLs.Add(userID, inventoryURL);
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 32d245f..d451b9e 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
464 // or creator data is present. Otherwise, use the estate owner instead. 464 // or creator data is present. Otherwise, use the estate owner instead.
465 foreach (SceneObjectPart part in sceneObject.Parts) 465 foreach (SceneObjectPart part in sceneObject.Parts)
466 { 466 {
467 if (part.CreatorData == null || part.CreatorData == string.Empty) 467 if (string.IsNullOrEmpty(part.CreatorData))
468 { 468 {
469 if (!ResolveUserUuid(scene, part.CreatorID)) 469 if (!ResolveUserUuid(scene, part.CreatorID))
470 part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner; 470 part.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
@@ -498,7 +498,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
498 kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner; 498 kvp.Value.OwnerID = scene.RegionInfo.EstateSettings.EstateOwner;
499 } 499 }
500 500
501 if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty) 501 if (string.IsNullOrEmpty(kvp.Value.CreatorData))
502 { 502 {
503 if (!ResolveUserUuid(scene, kvp.Value.CreatorID)) 503 if (!ResolveUserUuid(scene, kvp.Value.CreatorID))
504 kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner; 504 kvp.Value.CreatorID = scene.RegionInfo.EstateSettings.EstateOwner;
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 5b98d97..092dfa3 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -42,7 +42,6 @@ using OpenSim.Framework.Capabilities;
42using OpenSim.Framework.Console; 42using OpenSim.Framework.Console;
43using OpenSim.Framework.Servers; 43using OpenSim.Framework.Servers;
44using OpenSim.Framework.Servers.HttpServer; 44using OpenSim.Framework.Servers.HttpServer;
45using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
46using OpenSim.Region.Framework.Interfaces; 45using OpenSim.Region.Framework.Interfaces;
47using OpenSim.Region.Framework.Scenes; 46using OpenSim.Region.Framework.Scenes;
48using OpenSim.Region.Physics.Manager; 47using OpenSim.Region.Physics.Manager;
@@ -71,7 +70,6 @@ namespace OpenSim.Region.CoreModules.World.Land
71 70
72 private LandChannel landChannel; 71 private LandChannel landChannel;
73 private Scene m_scene; 72 private Scene m_scene;
74 protected Commander m_commander = new Commander("land");
75 73
76 protected IUserManagement m_userManager; 74 protected IUserManagement m_userManager;
77 protected IPrimCountModule m_primCountModule; 75 protected IPrimCountModule m_primCountModule;
@@ -139,14 +137,13 @@ namespace OpenSim.Region.CoreModules.World.Land
139 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage; 137 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
140 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan; 138 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
141 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps; 139 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
142 m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole;
143 140
144 lock (m_scene) 141 lock (m_scene)
145 { 142 {
146 m_scene.LandChannel = (ILandChannel)landChannel; 143 m_scene.LandChannel = (ILandChannel)landChannel;
147 } 144 }
148 145
149 InstallInterfaces(); 146 RegisterCommands();
150 } 147 }
151 148
152 public void RegionLoaded(Scene scene) 149 public void RegionLoaded(Scene scene)
@@ -158,10 +155,7 @@ namespace OpenSim.Region.CoreModules.World.Land
158 155
159 public void RemoveRegion(Scene scene) 156 public void RemoveRegion(Scene scene)
160 { 157 {
161 // TODO: Also release other event manager listeners here 158 // TODO: Release event manager listeners here
162
163 m_scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole;
164 m_scene.UnregisterModuleCommander(m_commander.Name);
165 } 159 }
166 160
167// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason) 161// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
@@ -169,30 +163,7 @@ namespace OpenSim.Region.CoreModules.World.Land
169// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y); 163// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y);
170// reason = "You are not allowed to enter this sim."; 164// reason = "You are not allowed to enter this sim.";
171// return nearestParcel != null; 165// return nearestParcel != null;
172// } 166// }
173
174 /// <summary>
175 /// Processes commandline input. Do not call directly.
176 /// </summary>
177 /// <param name="args">Commandline arguments</param>
178 protected void EventManagerOnPluginConsole(string[] args)
179 {
180 if (args[0] == "land")
181 {
182 if (args.Length == 1)
183 {
184 m_commander.ProcessConsoleCommand("help", new string[0]);
185 return;
186 }
187
188 string[] tmpArgs = new string[args.Length - 2];
189 int i;
190 for (i = 2; i < args.Length; i++)
191 tmpArgs[i - 2] = args[i];
192
193 m_commander.ProcessConsoleCommand(args[1], tmpArgs);
194 }
195 }
196 167
197 void EventManagerOnNewClient(IClientAPI client) 168 void EventManagerOnNewClient(IClientAPI client)
198 { 169 {
@@ -1982,44 +1953,84 @@ namespace OpenSim.Region.CoreModules.World.Land
1982 m_Dialog.SendAlertToUser(remoteClient, "You are not allowed to set your home location in this parcel."); 1953 m_Dialog.SendAlertToUser(remoteClient, "You are not allowed to set your home location in this parcel.");
1983 } 1954 }
1984 1955
1985 1956 protected void RegisterCommands()
1986 protected void InstallInterfaces()
1987 { 1957 {
1988 Command clearCommand 1958 ICommands commands = MainConsole.Instance.Commands;
1989 = new Command("clear", CommandIntentions.COMMAND_HAZARDOUS, ClearCommand, "Clears all the parcels from the region.");
1990 Command showCommand
1991 = new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowParcelsCommand, "Shows all parcels on the region.");
1992 1959
1993 m_commander.RegisterCommand("clear", clearCommand); 1960 commands.AddCommand(
1994 m_commander.RegisterCommand("show", showCommand); 1961 "Land", false, "land clear",
1962 "land clear",
1963 "Clear all the parcels from the region.",
1964 "Command will ask for confirmation before proceeding.",
1965 HandleClearCommand);
1995 1966
1996 // Add this to our scene so scripts can call these functions 1967 commands.AddCommand(
1997 m_scene.RegisterModuleCommander(m_commander); 1968 "Land", false, "land show",
1969 "land show [<local-land-id>]",
1970 "Show information about the parcels on the region.",
1971 "If no local land ID is given, then summary information about all the parcels is shown.\n"
1972 + "If a local land ID is given then full information about that parcel is shown.",
1973 HandleShowCommand);
1998 } 1974 }
1999 1975
2000 protected void ClearCommand(Object[] args) 1976 protected void HandleClearCommand(string module, string[] args)
2001 { 1977 {
1978 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
1979 return;
1980
2002 string response = MainConsole.Instance.CmdPrompt( 1981 string response = MainConsole.Instance.CmdPrompt(
2003 string.Format( 1982 string.Format(
2004 "Are you sure that you want to clear all land parcels from {0} (y or n)", 1983 "Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name),
2005 m_scene.RegionInfo.RegionName),
2006 "n"); 1984 "n");
2007 1985
2008 if (response.ToLower() == "y") 1986 if (response.ToLower() == "y")
2009 { 1987 {
2010 Clear(true); 1988 Clear(true);
2011 MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName); 1989 MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.Name);
2012 } 1990 }
2013 else 1991 else
2014 { 1992 {
2015 MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.RegionInfo.RegionName); 1993 MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name);
2016 } 1994 }
2017 } 1995 }
2018 1996
2019 protected void ShowParcelsCommand(Object[] args) 1997 protected void HandleShowCommand(string module, string[] args)
2020 { 1998 {
2021 StringBuilder report = new StringBuilder(); 1999 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
2022 2000 return;
2001
2002 StringBuilder report = new StringBuilder();
2003
2004 if (args.Length <= 2)
2005 {
2006 AppendParcelsSummaryReport(report);
2007 }
2008 else
2009 {
2010 int landLocalId;
2011
2012 if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[2], out landLocalId))
2013 return;
2014
2015 ILandObject lo;
2016
2017 lock (m_landList)
2018 {
2019 if (!m_landList.TryGetValue(landLocalId, out lo))
2020 {
2021 MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId);
2022 return;
2023 }
2024 }
2025
2026 AppendParcelReport(report, lo);
2027 }
2028
2029 MainConsole.Instance.Output(report.ToString());
2030 }
2031
2032 private void AppendParcelsSummaryReport(StringBuilder report)
2033 {
2023 report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName); 2034 report.AppendFormat("Land information for {0}\n", m_scene.RegionInfo.RegionName);
2024 report.AppendFormat( 2035 report.AppendFormat(
2025 "{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n", 2036 "{0,-20} {1,-10} {2,-9} {3,-18} {4,-18} {5,-20}\n",
@@ -2041,8 +2052,69 @@ namespace OpenSim.Region.CoreModules.World.Land
2041 ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID)); 2052 ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID));
2042 } 2053 }
2043 } 2054 }
2044 2055 }
2045 MainConsole.Instance.Output(report.ToString()); 2056
2046 } 2057 private void AppendParcelReport(StringBuilder report, ILandObject lo)
2058 {
2059 LandData ld = lo.LandData;
2060
2061 ConsoleDisplayList cdl = new ConsoleDisplayList();
2062 cdl.AddRow("Parcel name", ld.Name);
2063 cdl.AddRow("Local ID", ld.LocalID);
2064 cdl.AddRow("Description", ld.Description);
2065 cdl.AddRow("Snapshot ID", ld.SnapshotID);
2066 cdl.AddRow("Area", ld.Area);
2067 cdl.AddRow("Starts", lo.StartPoint);
2068 cdl.AddRow("Ends", lo.EndPoint);
2069 cdl.AddRow("AABB Min", ld.AABBMin);
2070 cdl.AddRow("AABB Max", ld.AABBMax);
2071
2072 cdl.AddRow("Owner", m_userManager.GetUserName(ld.OwnerID));
2073 cdl.AddRow("Is group owned?", ld.IsGroupOwned);
2074 cdl.AddRow("GroupID", ld.GroupID);
2075
2076 cdl.AddRow("Status", ld.Status);
2077 cdl.AddRow("Flags", (ParcelFlags)ld.Flags);
2078
2079 cdl.AddRow("Landing Type", (LandingType)ld.LandingType);
2080 cdl.AddRow("User Location", ld.UserLocation);
2081 cdl.AddRow("User look at", ld.UserLookAt);
2082
2083 cdl.AddRow("Other clean time", ld.OtherCleanTime);
2084
2085 cdl.AddRow("Max Prims", lo.GetParcelMaxPrimCount());
2086 IPrimCounts pc = lo.PrimCounts;
2087 cdl.AddRow("Owner Prims", pc.Owner);
2088 cdl.AddRow("Group Prims", pc.Group);
2089 cdl.AddRow("Other Prims", pc.Others);
2090 cdl.AddRow("Selected Prims", pc.Selected);
2091 cdl.AddRow("Total Prims", pc.Total);
2092
2093 cdl.AddRow("Music URL", ld.MusicURL);
2094 cdl.AddRow("Obscure Music", ld.ObscureMusic);
2095
2096 cdl.AddRow("Media ID", ld.MediaID);
2097 cdl.AddRow("Media Autoscale", Convert.ToBoolean(ld.MediaAutoScale));
2098 cdl.AddRow("Media URL", ld.MediaURL);
2099 cdl.AddRow("Media Type", ld.MediaType);
2100 cdl.AddRow("Media Description", ld.MediaDescription);
2101 cdl.AddRow("Media Width", ld.MediaWidth);
2102 cdl.AddRow("Media Height", ld.MediaHeight);
2103 cdl.AddRow("Media Loop", ld.MediaLoop);
2104 cdl.AddRow("Obscure Media", ld.ObscureMedia);
2105
2106 cdl.AddRow("Parcel Category", ld.Category);
2107
2108 cdl.AddRow("Claim Date", ld.ClaimDate);
2109 cdl.AddRow("Claim Price", ld.ClaimPrice);
2110 cdl.AddRow("Pass Hours", ld.PassHours);
2111 cdl.AddRow("Pass Price", ld.PassPrice);
2112
2113 cdl.AddRow("Auction ID", ld.AuctionID);
2114 cdl.AddRow("Authorized Buyer ID", ld.AuthBuyerID);
2115 cdl.AddRow("Sale Price", ld.SalePrice);
2116
2117 cdl.AddToStringBuilder(report);
2118 }
2047 } 2119 }
2048} 2120}
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
index dd48dd5..0c0a7aa 100644
--- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs
@@ -307,7 +307,7 @@ namespace OpenSim.Region.DataSnapshot
307 XmlNode regiondata = requestedSnap.CreateNode(XmlNodeType.Element, "regiondata", ""); 307 XmlNode regiondata = requestedSnap.CreateNode(XmlNodeType.Element, "regiondata", "");
308 try 308 try
309 { 309 {
310 if (regionName == null || regionName == "") 310 if (string.IsNullOrEmpty(regionName))
311 { 311 {
312 XmlNode timerblock = requestedSnap.CreateNode(XmlNodeType.Element, "expire", ""); 312 XmlNode timerblock = requestedSnap.CreateNode(XmlNodeType.Element, "expire", "");
313 timerblock.InnerText = m_period.ToString(); 313 timerblock.InnerText = m_period.ToString();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 9e6c25d..dcbb509 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -473,7 +473,7 @@ namespace OpenSim.Region.Framework.Scenes
473 { 473 {
474 get 474 get
475 { 475 {
476 if (CreatorData != null && CreatorData != string.Empty) 476 if (!string.IsNullOrEmpty(CreatorData))
477 return CreatorID.ToString() + ';' + CreatorData; 477 return CreatorID.ToString() + ';' + CreatorData;
478 else 478 else
479 return CreatorID.ToString(); 479 return CreatorID.ToString();
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 3ea936c..f07dee9 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1223 1223
1224 WriteUUID(writer, "CreatorID", sop.CreatorID, options); 1224 WriteUUID(writer, "CreatorID", sop.CreatorID, options);
1225 1225
1226 if (sop.CreatorData != null && sop.CreatorData != string.Empty) 1226 if (!string.IsNullOrEmpty(sop.CreatorData))
1227 writer.WriteElementString("CreatorData", sop.CreatorData); 1227 writer.WriteElementString("CreatorData", sop.CreatorData);
1228 else if (options.ContainsKey("home")) 1228 else if (options.ContainsKey("home"))
1229 { 1229 {
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1396 1396
1397 WriteUUID(writer, "CreatorID", item.CreatorID, options); 1397 WriteUUID(writer, "CreatorID", item.CreatorID, options);
1398 1398
1399 if (item.CreatorData != null && item.CreatorData != string.Empty) 1399 if (!string.IsNullOrEmpty(item.CreatorData))
1400 writer.WriteElementString("CreatorData", item.CreatorData); 1400 writer.WriteElementString("CreatorData", item.CreatorData);
1401 else if (options.ContainsKey("home")) 1401 else if (options.ContainsKey("home"))
1402 { 1402 {
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
index 5a37fad..b5d9fda 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
@@ -461,7 +461,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
461 461
462 string result = instr; 462 string result = instr;
463 463
464 if (result == null || result.Length == 0) 464 if (string.IsNullOrEmpty(result))
465 return result; 465 return result;
466 466
467 // Repeatedly scan the string until all possible 467 // Repeatedly scan the string until all possible
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index cdab116..b4fae9d 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -822,11 +822,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
822 { 822 {
823 string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken); 823 string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
824 824
825 if (parent != null && parent != String.Empty) 825 if (!string.IsNullOrEmpty(parent))
826 { 826 {
827 requrl = String.Format("{0}&chan_parent={1}", requrl, parent); 827 requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
828 } 828 }
829 if (description != null && description != String.Empty) 829 if (!string.IsNullOrEmpty(description))
830 { 830 {
831 requrl = String.Format("{0}&chan_desc={1}", requrl, description); 831 requrl = String.Format("{0}&chan_desc={1}", requrl, description);
832 } 832 }
@@ -862,7 +862,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
862 // requrl = String.Format("{0}&chan_parent={1}", requrl, parent); 862 // requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
863 // } 863 // }
864 864
865 if (description != null && description != String.Empty) 865 if (!string.IsNullOrEmpty(description))
866 { 866 {
867 requrl = String.Format("{0}&chan_desc={1}", requrl, description); 867 requrl = String.Format("{0}&chan_desc={1}", requrl, description);
868 } 868 }
@@ -1047,7 +1047,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1047 private XmlElement VivoxDeleteChannel(string parent, string channelid) 1047 private XmlElement VivoxDeleteChannel(string parent, string channelid)
1048 { 1048 {
1049 string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken); 1049 string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
1050 if (parent != null && parent != String.Empty) 1050 if (!string.IsNullOrEmpty(parent))
1051 { 1051 {
1052 requrl = String.Format("{0}&chan_parent={1}", requrl, parent); 1052 requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
1053 } 1053 }
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 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 6e74227..64dc2e2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -367,7 +367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
367 367
368 Vector3 ZeroVector = new Vector3(0, 0, 0); 368 Vector3 ZeroVector = new Vector3(0, 0, 0);
369 369
370 bool nameSearch = (ts.name != null && ts.name != ""); 370 bool nameSearch = !string.IsNullOrEmpty(ts.name);
371 371
372 foreach (EntityBase ent in Entities) 372 foreach (EntityBase ent in Entities)
373 { 373 {
@@ -605,7 +605,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
605 return sensedEntities; 605 return sensedEntities;
606 senseEntity(sp); 606 senseEntity(sp);
607 } 607 }
608 else if (ts.name != null && ts.name != "") 608 else if (!string.IsNullOrEmpty(ts.name))
609 { 609 {
610 ScenePresence sp; 610 ScenePresence sp;
611 // Try lookup by name will return if/when found 611 // Try lookup by name will return if/when found
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 87f7189..a1b8d85 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -618,7 +618,7 @@ namespace SecondLife
618 // error log. 618 // error log.
619 if (results.Errors.Count > 0) 619 if (results.Errors.Count > 0)
620 { 620 {
621 if (!retried && (results.Errors[0].FileName == null || results.Errors[0].FileName == String.Empty) && 621 if (!retried && string.IsNullOrEmpty(results.Errors[0].FileName) &&
622 results.Errors[0].Line == 0) 622 results.Errors[0].Line == 0)
623 { 623 {
624 // System.Console.WriteLine("retrying failed compilation"); 624 // System.Console.WriteLine("retrying failed compilation");
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs
index 326e68d..3233caf 100644
--- a/OpenSim/Services/HypergridService/HGInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGInventoryService.cs
@@ -298,7 +298,7 @@ namespace OpenSim.Services.HypergridService
298 UserAccount user = m_Cache.GetUser(it.CreatorId); 298 UserAccount user = m_Cache.GetUser(it.CreatorId);
299 299
300 // Adjust the creator data 300 // Adjust the creator data
301 if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) 301 if (user != null && it != null && string.IsNullOrEmpty(it.CreatorData))
302 it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName; 302 it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName;
303 } 303 }
304 return it; 304 return it;