diff options
author | Jeff Ames | 2008-07-23 13:24:25 +0000 |
---|---|---|
committer | Jeff Ames | 2008-07-23 13:24:25 +0000 |
commit | 80d8e2889e62d8900837d37a800a4eeaae5ffc5a (patch) | |
tree | 47bdf0f48ae8ace3bb7cd10ab91d91b52b96f80e | |
parent | get rid of some LLQuaternion == null checks. Because LLQuaternion is (diff) | |
download | opensim-SC-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.zip opensim-SC-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.gz opensim-SC-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.bz2 opensim-SC-80d8e2889e62d8900837d37a800a4eeaae5ffc5a.tar.xz |
Update svn properties. Formatting cleanup. Remove a compiler warning.
29 files changed, 404 insertions, 398 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index f8641bc..78d4446 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -101,8 +101,10 @@ namespace OpenSim.Data.MySQL | |||
101 | BindingFlags.DeclaredOnly); | 101 | BindingFlags.DeclaredOnly); |
102 | 102 | ||
103 | foreach (FieldInfo f in m_Fields) | 103 | foreach (FieldInfo f in m_Fields) |
104 | if(f.Name.Substring(0, 2) == "m_") | 104 | { |
105 | if (f.Name.Substring(0, 2) == "m_") | ||
105 | m_FieldMap[f.Name.Substring(2)] = f; | 106 | m_FieldMap[f.Name.Substring(2)] = f; |
107 | } | ||
106 | } | 108 | } |
107 | 109 | ||
108 | private string[] FieldList | 110 | private string[] FieldList |
@@ -171,14 +173,14 @@ namespace OpenSim.Data.MySQL | |||
171 | 173 | ||
172 | IDataReader r = cmd.ExecuteReader(); | 174 | IDataReader r = cmd.ExecuteReader(); |
173 | 175 | ||
174 | if(r.Read()) | 176 | if (r.Read()) |
175 | { | 177 | { |
176 | foreach (string name in FieldList) | 178 | foreach (string name in FieldList) |
177 | { | 179 | { |
178 | if(m_FieldMap[name].GetValue(es) is bool) | 180 | if (m_FieldMap[name].GetValue(es) is bool) |
179 | { | 181 | { |
180 | int v = Convert.ToInt32(r[name]); | 182 | int v = Convert.ToInt32(r[name]); |
181 | if(v != 0) | 183 | if (v != 0) |
182 | m_FieldMap[name].SetValue(es, true); | 184 | m_FieldMap[name].SetValue(es, true); |
183 | else | 185 | else |
184 | m_FieldMap[name].SetValue(es, false); | 186 | m_FieldMap[name].SetValue(es, false); |
@@ -207,9 +209,9 @@ namespace OpenSim.Data.MySQL | |||
207 | 209 | ||
208 | foreach (string name in FieldList) | 210 | foreach (string name in FieldList) |
209 | { | 211 | { |
210 | if(m_FieldMap[name].GetValue(es) is bool) | 212 | if (m_FieldMap[name].GetValue(es) is bool) |
211 | { | 213 | { |
212 | if((bool)m_FieldMap[name].GetValue(es)) | 214 | if ((bool)m_FieldMap[name].GetValue(es)) |
213 | cmd.Parameters.AddWithValue("?"+name, "1"); | 215 | cmd.Parameters.AddWithValue("?"+name, "1"); |
214 | else | 216 | else |
215 | cmd.Parameters.AddWithValue("?"+name, "0"); | 217 | cmd.Parameters.AddWithValue("?"+name, "0"); |
@@ -283,9 +285,9 @@ namespace OpenSim.Data.MySQL | |||
283 | 285 | ||
284 | foreach (string name in FieldList) | 286 | foreach (string name in FieldList) |
285 | { | 287 | { |
286 | if(m_FieldMap[name].GetValue(es) is bool) | 288 | if (m_FieldMap[name].GetValue(es) is bool) |
287 | { | 289 | { |
288 | if((bool)m_FieldMap[name].GetValue(es)) | 290 | if ((bool)m_FieldMap[name].GetValue(es)) |
289 | cmd.Parameters.AddWithValue("?"+name, "1"); | 291 | cmd.Parameters.AddWithValue("?"+name, "1"); |
290 | else | 292 | else |
291 | cmd.Parameters.AddWithValue("?"+name, "0"); | 293 | cmd.Parameters.AddWithValue("?"+name, "0"); |
@@ -317,7 +319,7 @@ namespace OpenSim.Data.MySQL | |||
317 | 319 | ||
318 | IDataReader r = cmd.ExecuteReader(); | 320 | IDataReader r = cmd.ExecuteReader(); |
319 | 321 | ||
320 | while(r.Read()) | 322 | while (r.Read()) |
321 | { | 323 | { |
322 | EstateBan eb = new EstateBan(); | 324 | EstateBan eb = new EstateBan(); |
323 | 325 | ||
@@ -347,7 +349,7 @@ namespace OpenSim.Data.MySQL | |||
347 | 349 | ||
348 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( ?EstateID, ?bannedUUID )"; | 350 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( ?EstateID, ?bannedUUID )"; |
349 | 351 | ||
350 | foreach(EstateBan b in es.EstateBans) | 352 | foreach (EstateBan b in es.EstateBans) |
351 | { | 353 | { |
352 | cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString()); | 354 | cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString()); |
353 | cmd.Parameters.AddWithValue("?bannedUUID", b.bannedUUID.ToString()); | 355 | cmd.Parameters.AddWithValue("?bannedUUID", b.bannedUUID.ToString()); |
@@ -372,7 +374,7 @@ namespace OpenSim.Data.MySQL | |||
372 | 374 | ||
373 | cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )"; | 375 | cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( ?EstateID, ?uuid )"; |
374 | 376 | ||
375 | foreach(LLUUID uuid in data) | 377 | foreach (LLUUID uuid in data) |
376 | { | 378 | { |
377 | cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString()); | 379 | cmd.Parameters.AddWithValue("?EstateID", EstateID.ToString()); |
378 | cmd.Parameters.AddWithValue("?uuid", uuid.ToString()); | 380 | cmd.Parameters.AddWithValue("?uuid", uuid.ToString()); |
@@ -395,7 +397,7 @@ namespace OpenSim.Data.MySQL | |||
395 | 397 | ||
396 | IDataReader r = cmd.ExecuteReader(); | 398 | IDataReader r = cmd.ExecuteReader(); |
397 | 399 | ||
398 | while(r.Read()) | 400 | while (r.Read()) |
399 | { | 401 | { |
400 | // EstateBan eb = new EstateBan(); | 402 | // EstateBan eb = new EstateBan(); |
401 | 403 | ||
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 823b81b..99de5cd 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Data.SQLite | |||
94 | /// <returns>Asset base</returns> | 94 | /// <returns>Asset base</returns> |
95 | override public AssetBase FetchAsset(LLUUID uuid) | 95 | override public AssetBase FetchAsset(LLUUID uuid) |
96 | { | 96 | { |
97 | lock(this) | 97 | lock (this) |
98 | { | 98 | { |
99 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 99 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
100 | { | 100 | { |
@@ -130,7 +130,8 @@ namespace OpenSim.Data.SQLite | |||
130 | } | 130 | } |
131 | else | 131 | else |
132 | { | 132 | { |
133 | lock(this) { | 133 | lock (this) |
134 | { | ||
134 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) | 135 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) |
135 | { | 136 | { |
136 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); | 137 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); |
@@ -155,7 +156,8 @@ namespace OpenSim.Data.SQLite | |||
155 | { | 156 | { |
156 | LogAssetLoad(asset); | 157 | LogAssetLoad(asset); |
157 | 158 | ||
158 | lock(this) { | 159 | lock (this) |
160 | { | ||
159 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) | 161 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) |
160 | { | 162 | { |
161 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); | 163 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); |
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs index db85239..93d86b6 100644 --- a/OpenSim/Data/SQLite/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Data.SQLite | |||
74 | BindingFlags.DeclaredOnly); | 74 | BindingFlags.DeclaredOnly); |
75 | 75 | ||
76 | foreach (FieldInfo f in m_Fields) | 76 | foreach (FieldInfo f in m_Fields) |
77 | if(f.Name.Substring(0, 2) == "m_") | 77 | if (f.Name.Substring(0, 2) == "m_") |
78 | m_FieldMap[f.Name.Substring(2)] = f; | 78 | m_FieldMap[f.Name.Substring(2)] = f; |
79 | } | 79 | } |
80 | 80 | ||
@@ -97,14 +97,14 @@ namespace OpenSim.Data.SQLite | |||
97 | 97 | ||
98 | IDataReader r = cmd.ExecuteReader(); | 98 | IDataReader r = cmd.ExecuteReader(); |
99 | 99 | ||
100 | if(r.Read()) | 100 | if (r.Read()) |
101 | { | 101 | { |
102 | foreach (string name in FieldList) | 102 | foreach (string name in FieldList) |
103 | { | 103 | { |
104 | if(m_FieldMap[name].GetValue(es) is bool) | 104 | if (m_FieldMap[name].GetValue(es) is bool) |
105 | { | 105 | { |
106 | int v = Convert.ToInt32(r[name]); | 106 | int v = Convert.ToInt32(r[name]); |
107 | if(v != 0) | 107 | if (v != 0) |
108 | m_FieldMap[name].SetValue(es, true); | 108 | m_FieldMap[name].SetValue(es, true); |
109 | else | 109 | else |
110 | m_FieldMap[name].SetValue(es, false); | 110 | m_FieldMap[name].SetValue(es, false); |
@@ -133,9 +133,9 @@ namespace OpenSim.Data.SQLite | |||
133 | 133 | ||
134 | foreach (string name in FieldList) | 134 | foreach (string name in FieldList) |
135 | { | 135 | { |
136 | if(m_FieldMap[name].GetValue(es) is bool) | 136 | if (m_FieldMap[name].GetValue(es) is bool) |
137 | { | 137 | { |
138 | if((bool)m_FieldMap[name].GetValue(es)) | 138 | if ((bool)m_FieldMap[name].GetValue(es)) |
139 | cmd.Parameters.Add(":"+name, "1"); | 139 | cmd.Parameters.Add(":"+name, "1"); |
140 | else | 140 | else |
141 | cmd.Parameters.Add(":"+name, "0"); | 141 | cmd.Parameters.Add(":"+name, "0"); |
@@ -215,9 +215,9 @@ namespace OpenSim.Data.SQLite | |||
215 | 215 | ||
216 | foreach (string name in FieldList) | 216 | foreach (string name in FieldList) |
217 | { | 217 | { |
218 | if(m_FieldMap[name].GetValue(es) is bool) | 218 | if (m_FieldMap[name].GetValue(es) is bool) |
219 | { | 219 | { |
220 | if((bool)m_FieldMap[name].GetValue(es)) | 220 | if ((bool)m_FieldMap[name].GetValue(es)) |
221 | cmd.Parameters.Add(":"+name, "1"); | 221 | cmd.Parameters.Add(":"+name, "1"); |
222 | else | 222 | else |
223 | cmd.Parameters.Add(":"+name, "0"); | 223 | cmd.Parameters.Add(":"+name, "0"); |
@@ -247,7 +247,7 @@ namespace OpenSim.Data.SQLite | |||
247 | 247 | ||
248 | IDataReader r = cmd.ExecuteReader(); | 248 | IDataReader r = cmd.ExecuteReader(); |
249 | 249 | ||
250 | while(r.Read()) | 250 | while (r.Read()) |
251 | { | 251 | { |
252 | EstateBan eb = new EstateBan(); | 252 | EstateBan eb = new EstateBan(); |
253 | 253 | ||
@@ -275,7 +275,7 @@ namespace OpenSim.Data.SQLite | |||
275 | 275 | ||
276 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )"; | 276 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( :EstateID, :bannedUUID, '', '', '' )"; |
277 | 277 | ||
278 | foreach(EstateBan b in es.EstateBans) | 278 | foreach (EstateBan b in es.EstateBans) |
279 | { | 279 | { |
280 | cmd.Parameters.Add(":EstateID", es.EstateID.ToString()); | 280 | cmd.Parameters.Add(":EstateID", es.EstateID.ToString()); |
281 | cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString()); | 281 | cmd.Parameters.Add(":bannedUUID", b.bannedUUID.ToString()); |
@@ -298,7 +298,7 @@ namespace OpenSim.Data.SQLite | |||
298 | 298 | ||
299 | cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; | 299 | cmd.CommandText = "insert into "+table+" (EstateID, uuid) values ( :EstateID, :uuid )"; |
300 | 300 | ||
301 | foreach(LLUUID uuid in data) | 301 | foreach (LLUUID uuid in data) |
302 | { | 302 | { |
303 | cmd.Parameters.Add(":EstateID", EstateID.ToString()); | 303 | cmd.Parameters.Add(":EstateID", EstateID.ToString()); |
304 | cmd.Parameters.Add(":uuid", uuid.ToString()); | 304 | cmd.Parameters.Add(":uuid", uuid.ToString()); |
@@ -319,7 +319,7 @@ namespace OpenSim.Data.SQLite | |||
319 | 319 | ||
320 | IDataReader r = cmd.ExecuteReader(); | 320 | IDataReader r = cmd.ExecuteReader(); |
321 | 321 | ||
322 | while(r.Read()) | 322 | while (r.Read()) |
323 | { | 323 | { |
324 | // EstateBan eb = new EstateBan(); | 324 | // EstateBan eb = new EstateBan(); |
325 | 325 | ||
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index 5b7e911..586ccd7 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Framework | |||
63 | Monitor.Wait(m_queueSync); | 63 | Monitor.Wait(m_queueSync); |
64 | } | 64 | } |
65 | 65 | ||
66 | if(m_pqueue.Count > 0) | 66 | if (m_pqueue.Count > 0) |
67 | return m_pqueue.Dequeue(); | 67 | return m_pqueue.Dequeue(); |
68 | return m_queue.Dequeue(); | 68 | return m_queue.Dequeue(); |
69 | } | 69 | } |
@@ -73,7 +73,7 @@ namespace OpenSim.Framework | |||
73 | { | 73 | { |
74 | lock (m_queueSync) | 74 | lock (m_queueSync) |
75 | { | 75 | { |
76 | if(m_pqueue.Contains(item)) | 76 | if (m_pqueue.Contains(item)) |
77 | return true; | 77 | return true; |
78 | return m_queue.Contains(item); | 78 | return m_queue.Contains(item); |
79 | } | 79 | } |
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 90b0a10..6eff690 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -447,7 +447,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
447 | RequestedAssets.Remove(assetInf.FullID); | 447 | RequestedAssets.Remove(assetInf.FullID); |
448 | // If it's a direct request for a script, drop it | 448 | // If it's a direct request for a script, drop it |
449 | // because it's a hacked client | 449 | // because it's a hacked client |
450 | if(req.AssetRequestSource != 2 || assetInf.Type != 10) | 450 | if (req.AssetRequestSource != 2 || assetInf.Type != 10) |
451 | AssetRequests.Add(req); | 451 | AssetRequests.Add(req); |
452 | } | 452 | } |
453 | } | 453 | } |
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 383c129..11516f0 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -728,7 +728,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
728 | 728 | ||
729 | public void Execute() | 729 | public void Execute() |
730 | { | 730 | { |
731 | if(m_delegate != null) | 731 | if (m_delegate != null) |
732 | m_delegate.DynamicInvoke(m_args); | 732 | m_delegate.DynamicInvoke(m_args); |
733 | } | 733 | } |
734 | } | 734 | } |
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 13fabaf..d157bac 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs | |||
@@ -233,7 +233,7 @@ namespace OpenSim.Framework | |||
233 | 233 | ||
234 | public void Save() | 234 | public void Save() |
235 | { | 235 | { |
236 | if(OnSave != null) | 236 | if (OnSave != null) |
237 | OnSave(this); | 237 | OnSave(this); |
238 | } | 238 | } |
239 | 239 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3fa26e4..7141e13 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -4737,51 +4737,51 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4737 | requestID = new LLUUID(transfer.TransferInfo.Params, 80); | 4737 | requestID = new LLUUID(transfer.TransferInfo.Params, 80); |
4738 | if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions())) | 4738 | if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions())) |
4739 | { | 4739 | { |
4740 | if(taskID != LLUUID.Zero) // Prim | 4740 | if (taskID != LLUUID.Zero) // Prim |
4741 | { | 4741 | { |
4742 | SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); | 4742 | SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); |
4743 | if(part == null) | 4743 | if (part == null) |
4744 | break; | 4744 | break; |
4745 | 4745 | ||
4746 | if(part.OwnerID != AgentId) | 4746 | if (part.OwnerID != AgentId) |
4747 | break; | 4747 | break; |
4748 | 4748 | ||
4749 | if((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 4749 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
4750 | break; | 4750 | break; |
4751 | 4751 | ||
4752 | TaskInventoryItem ti = part.GetInventoryItem(itemID); | 4752 | TaskInventoryItem ti = part.GetInventoryItem(itemID); |
4753 | if(ti == null) | 4753 | if (ti == null) |
4754 | break; | 4754 | break; |
4755 | 4755 | ||
4756 | if(ti.OwnerID != AgentId) | 4756 | if (ti.OwnerID != AgentId) |
4757 | break; | 4757 | break; |
4758 | 4758 | ||
4759 | if((ti.OwnerMask & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) | 4759 | if ((ti.OwnerMask & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) |
4760 | break; | 4760 | break; |
4761 | 4761 | ||
4762 | if(ti.AssetID != requestID) | 4762 | if (ti.AssetID != requestID) |
4763 | break; | 4763 | break; |
4764 | } | 4764 | } |
4765 | else // Agent | 4765 | else // Agent |
4766 | { | 4766 | { |
4767 | CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); | 4767 | CachedUserInfo userInfo = ((Scene)m_scene).CommsManager.UserProfileCacheService.GetUserDetails(AgentId); |
4768 | if(userInfo == null) | 4768 | if (userInfo == null) |
4769 | break; | 4769 | break; |
4770 | 4770 | ||
4771 | if(userInfo.RootFolder == null) | 4771 | if (userInfo.RootFolder == null) |
4772 | break; | 4772 | break; |
4773 | 4773 | ||
4774 | InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID); | 4774 | InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID); |
4775 | if(assetRequestItem == null) | 4775 | if (assetRequestItem == null) |
4776 | { | 4776 | { |
4777 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID); | 4777 | assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID); |
4778 | if(assetRequestItem == null) | 4778 | if (assetRequestItem == null) |
4779 | return; | 4779 | return; |
4780 | } | 4780 | } |
4781 | 4781 | ||
4782 | if((assetRequestItem.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) | 4782 | if ((assetRequestItem.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) |
4783 | break; | 4783 | break; |
4784 | if(assetRequestItem.AssetID != requestID) | 4784 | if (assetRequestItem.AssetID != requestID) |
4785 | break; | 4785 | break; |
4786 | } | 4786 | } |
4787 | } | 4787 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index c09da9b..11abf87 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |||
@@ -57,9 +57,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
57 | void InPacket(Packet packet); | 57 | void InPacket(Packet packet); |
58 | void ProcessInPacket(Packet packet); | 58 | void ProcessInPacket(Packet packet); |
59 | void OutPacket(Packet NewPack, | 59 | void OutPacket(Packet NewPack, |
60 | ThrottleOutPacketType throttlePacketType); | 60 | ThrottleOutPacketType throttlePacketType); |
61 | void OutPacket(Packet NewPack, | 61 | void OutPacket(Packet NewPack, |
62 | ThrottleOutPacketType throttlePacketType, Object id); | 62 | ThrottleOutPacketType throttlePacketType, Object id); |
63 | LLPacketQueue PacketQueue { get; } | 63 | LLPacketQueue PacketQueue { get; } |
64 | void Stop(); | 64 | void Stop(); |
65 | void Flush(); | 65 | void Flush(); |
@@ -136,7 +136,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
136 | // time for a linear scan. | 136 | // time for a linear scan. |
137 | // | 137 | // |
138 | private Dictionary<uint, int> m_DupeTracker = | 138 | private Dictionary<uint, int> m_DupeTracker = |
139 | new Dictionary<uint, int>(); | 139 | new Dictionary<uint, int>(); |
140 | private uint m_DupeTrackerWindow = 30; | 140 | private uint m_DupeTrackerWindow = 30; |
141 | 141 | ||
142 | // Values for the SimStatsReporter | 142 | // Values for the SimStatsReporter |
@@ -207,14 +207,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
207 | // notifier. | 207 | // notifier. |
208 | // | 208 | // |
209 | public void OutPacket( | 209 | public void OutPacket( |
210 | Packet packet, ThrottleOutPacketType throttlePacketType) | 210 | Packet packet, ThrottleOutPacketType throttlePacketType) |
211 | { | 211 | { |
212 | OutPacket(packet, throttlePacketType, null); | 212 | OutPacket(packet, throttlePacketType, null); |
213 | } | 213 | } |
214 | 214 | ||
215 | public void OutPacket( | 215 | public void OutPacket( |
216 | Packet packet, ThrottleOutPacketType throttlePacketType, | 216 | Packet packet, ThrottleOutPacketType throttlePacketType, |
217 | Object id) | 217 | Object id) |
218 | { | 218 | { |
219 | // Call the load balancer's hook. If this is not active here | 219 | // Call the load balancer's hook. If this is not active here |
220 | // we defer to the sim server this client is actually connected | 220 | // we defer to the sim server this client is actually connected |
@@ -224,20 +224,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
224 | if ((m_SynchronizeClient != null) && (!m_Client.IsActive)) | 224 | if ((m_SynchronizeClient != null) && (!m_Client.IsActive)) |
225 | { | 225 | { |
226 | if (m_SynchronizeClient(m_Client.Scene, packet, | 226 | if (m_SynchronizeClient(m_Client.Scene, packet, |
227 | m_Client.AgentId, throttlePacketType)) | 227 | m_Client.AgentId, throttlePacketType)) |
228 | return; | 228 | return; |
229 | } | 229 | } |
230 | 230 | ||
231 | packet.Header.Sequence = NextPacketSequenceNumber(); | 231 | packet.Header.Sequence = NextPacketSequenceNumber(); |
232 | 232 | ||
233 | lock(m_NeedAck) | 233 | lock (m_NeedAck) |
234 | { | 234 | { |
235 | DropResend(id); | 235 | DropResend(id); |
236 | 236 | ||
237 | QueuePacket(packet, throttlePacketType, id); | 237 | QueuePacket(packet, throttlePacketType, id); |
238 | 238 | ||
239 | // We want to see that packet arrive if it's reliable | 239 | // We want to see that packet arrive if it's reliable |
240 | if(packet.Header.Reliable) | 240 | if (packet.Header.Reliable) |
241 | { | 241 | { |
242 | m_UnackedBytes += packet.ToBytes().Length; | 242 | m_UnackedBytes += packet.ToBytes().Length; |
243 | m_NeedAck[packet.Header.Sequence] = new AckData(packet, id); | 243 | m_NeedAck[packet.Header.Sequence] = new AckData(packet, id); |
@@ -251,24 +251,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
251 | { | 251 | { |
252 | // Add acks to outgoing packets | 252 | // Add acks to outgoing packets |
253 | // | 253 | // |
254 | if(m_PendingAcks.Count > 0) | 254 | if (m_PendingAcks.Count > 0) |
255 | { | 255 | { |
256 | int count = m_PendingAcks.Count; | 256 | int count = m_PendingAcks.Count; |
257 | if(count > 10) | 257 | if (count > 10) |
258 | count = 10; | 258 | count = 10; |
259 | packet.Header.AckList = new uint[count]; | 259 | packet.Header.AckList = new uint[count]; |
260 | 260 | ||
261 | int i = 0; | 261 | int i = 0; |
262 | 262 | ||
263 | foreach (uint ack in new List<uint>(m_PendingAcks.Keys)) | 263 | foreach (uint ack in new List<uint>(m_PendingAcks.Keys)) |
264 | { | 264 | { |
265 | packet.Header.AckList[i] = ack; | 265 | packet.Header.AckList[i] = ack; |
266 | i++; | 266 | i++; |
267 | m_PendingAcks.Remove(ack); | 267 | m_PendingAcks.Remove(ack); |
268 | if (i >= 10) // That is how much space there is | 268 | if (i >= 10) // That is how much space there is |
269 | break; | 269 | break; |
270 | } | 270 | } |
271 | } | 271 | } |
272 | 272 | ||
273 | packet.TickCount = System.Environment.TickCount; | 273 | packet.TickCount = System.Environment.TickCount; |
274 | 274 | ||
@@ -291,14 +291,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
291 | // anything. There may not be a client there, don't clog up the | 291 | // anything. There may not be a client there, don't clog up the |
292 | // pipes. | 292 | // pipes. |
293 | // | 293 | // |
294 | if(lastAck == 0) | 294 | if (lastAck == 0) |
295 | return; | 295 | return; |
296 | 296 | ||
297 | lock (m_NeedAck) | 297 | lock (m_NeedAck) |
298 | { | 298 | { |
299 | // Nothing to do | 299 | // Nothing to do |
300 | // | 300 | // |
301 | if(m_NeedAck.Count == 0) | 301 | if (m_NeedAck.Count == 0) |
302 | return; | 302 | return; |
303 | 303 | ||
304 | // If we have seen no acks in <SilenceLimit> s but are | 304 | // If we have seen no acks in <SilenceLimit> s but are |
@@ -307,7 +307,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
307 | // then it will be dropped. | 307 | // then it will be dropped. |
308 | // | 308 | // |
309 | if ((((now - lastAck) > m_SilenceLimit) && | 309 | if ((((now - lastAck) > m_SilenceLimit) && |
310 | m_NeedAck.Count > 0) || m_NeedAck.Count == 0) | 310 | m_NeedAck.Count > 0) || m_NeedAck.Count == 0) |
311 | { | 311 | { |
312 | return; | 312 | return; |
313 | } | 313 | } |
@@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
336 | // | 336 | // |
337 | if ((now - packet.TickCount) > m_DiscardTimeout) | 337 | if ((now - packet.TickCount) > m_DiscardTimeout) |
338 | { | 338 | { |
339 | if(!m_ImportantPackets.Contains(packet.Type)) | 339 | if (!m_ImportantPackets.Contains(packet.Type)) |
340 | m_NeedAck.Remove(packet.Header.Sequence); | 340 | m_NeedAck.Remove(packet.Header.Sequence); |
341 | 341 | ||
342 | TriggerOnPacketDrop(packet, data.Identifier); | 342 | TriggerOnPacketDrop(packet, data.Identifier); |
@@ -364,8 +364,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
364 | // the counter reaches 250. So there is a good chance another | 364 | // the counter reaches 250. So there is a good chance another |
365 | // packet with 250 blocks exists. | 365 | // packet with 250 blocks exists. |
366 | // | 366 | // |
367 | if(acks.Packets == null || | 367 | if (acks.Packets == null || |
368 | acks.Packets.Length != m_PendingAcks.Count) | 368 | acks.Packets.Length != m_PendingAcks.Count) |
369 | acks.Packets = new PacketAckPacket.PacketsBlock[m_PendingAcks.Count]; | 369 | acks.Packets = new PacketAckPacket.PacketsBlock[m_PendingAcks.Count]; |
370 | int i = 0; | 370 | int i = 0; |
371 | foreach (uint ack in new List<uint>(m_PendingAcks.Keys)) | 371 | foreach (uint ack in new List<uint>(m_PendingAcks.Keys)) |
@@ -389,11 +389,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
389 | { | 389 | { |
390 | lock (m_PendingAcks) | 390 | lock (m_PendingAcks) |
391 | { | 391 | { |
392 | if(m_PendingAcks.Count < 250) | 392 | if (m_PendingAcks.Count < 250) |
393 | { | 393 | { |
394 | if(!m_PendingAcks.ContainsKey(packet.Header.Sequence)) | 394 | if (!m_PendingAcks.ContainsKey(packet.Header.Sequence)) |
395 | m_PendingAcks.Add(packet.Header.Sequence, | 395 | m_PendingAcks.Add(packet.Header.Sequence, |
396 | packet.Header.Sequence); | 396 | packet.Header.Sequence); |
397 | return; | 397 | return; |
398 | } | 398 | } |
399 | } | 399 | } |
@@ -405,11 +405,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
405 | // If this is still full we have a truly exceptional | 405 | // If this is still full we have a truly exceptional |
406 | // condition (means, can't happen) | 406 | // condition (means, can't happen) |
407 | // | 407 | // |
408 | if(m_PendingAcks.Count < 250) | 408 | if (m_PendingAcks.Count < 250) |
409 | { | 409 | { |
410 | if(!m_PendingAcks.ContainsKey(packet.Header.Sequence)) | 410 | if (!m_PendingAcks.ContainsKey(packet.Header.Sequence)) |
411 | m_PendingAcks.Add(packet.Header.Sequence, | 411 | m_PendingAcks.Add(packet.Header.Sequence, |
412 | packet.Header.Sequence); | 412 | packet.Header.Sequence); |
413 | return; | 413 | return; |
414 | } | 414 | } |
415 | } | 415 | } |
@@ -433,9 +433,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
433 | if (handlerPacketStats != null) | 433 | if (handlerPacketStats != null) |
434 | { | 434 | { |
435 | handlerPacketStats( | 435 | handlerPacketStats( |
436 | m_PacketsReceived - m_PacketsReceivedReported, | 436 | m_PacketsReceived - m_PacketsReceivedReported, |
437 | m_PacketsSent - m_PacketsSentReported, | 437 | m_PacketsSent - m_PacketsSentReported, |
438 | m_UnackedBytes); | 438 | m_UnackedBytes); |
439 | 439 | ||
440 | m_PacketsReceivedReported = m_PacketsReceived; | 440 | m_PacketsReceivedReported = m_PacketsReceived; |
441 | m_PacketsSentReported = m_PacketsSent; | 441 | m_PacketsSentReported = m_PacketsSent; |
@@ -450,12 +450,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
450 | lock (m_DupeTracker) | 450 | lock (m_DupeTracker) |
451 | { | 451 | { |
452 | Dictionary<uint, int> packs = | 452 | Dictionary<uint, int> packs = |
453 | new Dictionary<uint, int>(m_DupeTracker); | 453 | new Dictionary<uint, int>(m_DupeTracker); |
454 | 454 | ||
455 | foreach (uint pack in packs.Keys) | 455 | foreach (uint pack in packs.Keys) |
456 | { | 456 | { |
457 | if(Util.UnixTimeSinceEpoch() - m_DupeTracker[pack] > | 457 | if (Util.UnixTimeSinceEpoch() - m_DupeTracker[pack] > |
458 | m_DupeTrackerWindow) | 458 | m_DupeTrackerWindow) |
459 | m_DupeTracker.Remove(pack); | 459 | m_DupeTracker.Remove(pack); |
460 | } | 460 | } |
461 | } | 461 | } |
@@ -463,13 +463,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
463 | 463 | ||
464 | public void InPacket(Packet packet) | 464 | public void InPacket(Packet packet) |
465 | { | 465 | { |
466 | if(packet == null) | 466 | if (packet == null) |
467 | return; | 467 | return; |
468 | 468 | ||
469 | // If this client is on another partial instance, no need | 469 | // If this client is on another partial instance, no need |
470 | // to handle packets | 470 | // to handle packets |
471 | // | 471 | // |
472 | if(!m_Client.IsActive && packet.Type != PacketType.LogoutRequest) | 472 | if (!m_Client.IsActive && packet.Type != PacketType.LogoutRequest) |
473 | { | 473 | { |
474 | PacketPool.Instance.ReturnPacket(packet); | 474 | PacketPool.Instance.ReturnPacket(packet); |
475 | return; | 475 | return; |
@@ -478,9 +478,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
478 | // Any packet can have some packet acks in the header. | 478 | // Any packet can have some packet acks in the header. |
479 | // Process them here | 479 | // Process them here |
480 | // | 480 | // |
481 | if(packet.Header.AppendedAcks) | 481 | if (packet.Header.AppendedAcks) |
482 | { | 482 | { |
483 | foreach(uint id in packet.Header.AckList) | 483 | foreach (uint id in packet.Header.AckList) |
484 | { | 484 | { |
485 | ProcessAck(id); | 485 | ProcessAck(id); |
486 | } | 486 | } |
@@ -489,12 +489,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
489 | // When too many acks are needed to be sent, the client sends | 489 | // When too many acks are needed to be sent, the client sends |
490 | // a packet consisting of acks only | 490 | // a packet consisting of acks only |
491 | // | 491 | // |
492 | if(packet.Type == PacketType.PacketAck) | 492 | if (packet.Type == PacketType.PacketAck) |
493 | { | 493 | { |
494 | PacketAckPacket ackPacket = (PacketAckPacket)packet; | 494 | PacketAckPacket ackPacket = (PacketAckPacket)packet; |
495 | 495 | ||
496 | foreach (PacketAckPacket.PacketsBlock block in | 496 | foreach (PacketAckPacket.PacketsBlock block in |
497 | ackPacket.Packets) | 497 | ackPacket.Packets) |
498 | { | 498 | { |
499 | ProcessAck(block.ID); | 499 | ProcessAck(block.ID); |
500 | } | 500 | } |
@@ -502,7 +502,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
502 | PacketPool.Instance.ReturnPacket(packet); | 502 | PacketPool.Instance.ReturnPacket(packet); |
503 | return; | 503 | return; |
504 | } | 504 | } |
505 | else if(packet.Type == PacketType.StartPingCheck) | 505 | else if (packet.Type == PacketType.StartPingCheck) |
506 | { | 506 | { |
507 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; | 507 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; |
508 | CompletePingCheckPacket endPing = (CompletePingCheckPacket)PacketPool.Instance.GetPacket(PacketType.CompletePingCheck); | 508 | CompletePingCheckPacket endPing = (CompletePingCheckPacket)PacketPool.Instance.GetPacket(PacketType.CompletePingCheck); |
@@ -537,7 +537,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
537 | return; | 537 | return; |
538 | 538 | ||
539 | m_DupeTracker.Add(packet.Header.Sequence, | 539 | m_DupeTracker.Add(packet.Header.Sequence, |
540 | Util.UnixTimeSinceEpoch()); | 540 | Util.UnixTimeSinceEpoch()); |
541 | } | 541 | } |
542 | 542 | ||
543 | m_Client.ProcessInPacket(packet); | 543 | m_Client.ProcessInPacket(packet); |
@@ -560,9 +560,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
560 | AckData data; | 560 | AckData data; |
561 | Packet packet; | 561 | Packet packet; |
562 | 562 | ||
563 | lock(m_NeedAck) | 563 | lock (m_NeedAck) |
564 | { | 564 | { |
565 | if(!m_NeedAck.TryGetValue(id, out data)) | 565 | if (!m_NeedAck.TryGetValue(id, out data)) |
566 | return; | 566 | return; |
567 | 567 | ||
568 | packet = data.Packet; | 568 | packet = data.Packet; |
@@ -650,7 +650,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
650 | 650 | ||
651 | public void AddImportantPacket(PacketType type) | 651 | public void AddImportantPacket(PacketType type) |
652 | { | 652 | { |
653 | if(m_ImportantPackets.Contains(type)) | 653 | if (m_ImportantPackets.Contains(type)) |
654 | return; | 654 | return; |
655 | 655 | ||
656 | m_ImportantPackets.Add(type); | 656 | m_ImportantPackets.Add(type); |
@@ -658,7 +658,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
658 | 658 | ||
659 | public void RemoveImportantPacket(PacketType type) | 659 | public void RemoveImportantPacket(PacketType type) |
660 | { | 660 | { |
661 | if(!m_ImportantPackets.Contains(type)) | 661 | if (!m_ImportantPackets.Contains(type)) |
662 | return; | 662 | return; |
663 | 663 | ||
664 | m_ImportantPackets.Remove(type); | 664 | m_ImportantPackets.Remove(type); |
@@ -668,7 +668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
668 | { | 668 | { |
669 | foreach (AckData data in new List<AckData>(m_NeedAck.Values)) | 669 | foreach (AckData data in new List<AckData>(m_NeedAck.Values)) |
670 | { | 670 | { |
671 | if(data.Identifier != null && data.Identifier == id) | 671 | if (data.Identifier != null && data.Identifier == id) |
672 | { | 672 | { |
673 | m_NeedAck.Remove(data.Packet.Header.Sequence); | 673 | m_NeedAck.Remove(data.Packet.Header.Sequence); |
674 | return; | 674 | return; |
@@ -680,7 +680,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
680 | { | 680 | { |
681 | PacketDrop handlerPacketDrop = OnPacketDrop; | 681 | PacketDrop handlerPacketDrop = OnPacketDrop; |
682 | 682 | ||
683 | if(handlerPacketDrop == null) | 683 | if (handlerPacketDrop == null) |
684 | return; | 684 | return; |
685 | 685 | ||
686 | handlerPacketDrop(packet, id); | 686 | handlerPacketDrop(packet, id); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 96f8ac6..aed9465 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -338,7 +338,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
338 | if (TaskThrottle.UnderLimit() && (TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0)) | 338 | if (TaskThrottle.UnderLimit() && (TaskOutgoingPacketQueue.Count > 0 || TaskLowpriorityPacketQueue.Count > 0)) |
339 | { | 339 | { |
340 | LLQueItem qpack; | 340 | LLQueItem qpack; |
341 | if(TaskOutgoingPacketQueue.Count > 0) | 341 | if (TaskOutgoingPacketQueue.Count > 0) |
342 | { | 342 | { |
343 | qpack = TaskOutgoingPacketQueue.Dequeue(); | 343 | qpack = TaskOutgoingPacketQueue.Dequeue(); |
344 | SendQueue.PriorityEnqueue(qpack); | 344 | SendQueue.PriorityEnqueue(qpack); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 321c2ff..28f5a32 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -380,8 +380,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
380 | //Slave regions don't accept new clients | 380 | //Slave regions don't accept new clients |
381 | if (m_localScene.Region_Status != RegionStatus.SlaveScene) | 381 | if (m_localScene.Region_Status != RegionStatus.SlaveScene) |
382 | { | 382 | { |
383 | if (!(packet is UseCircuitCodePacket)) | 383 | if (!(packet is UseCircuitCodePacket)) |
384 | return; | 384 | return; |
385 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; | 385 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; |
386 | lock (clientCircuits) | 386 | lock (clientCircuits) |
387 | { | 387 | { |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs index c65f958..1162c25 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs | |||
@@ -78,33 +78,33 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
78 | 78 | ||
79 | //Load SMTP SERVER config | 79 | //Load SMTP SERVER config |
80 | try | 80 | try |
81 | { | 81 | { |
82 | if ((SMTPConfig = m_Config.Configs["SMTP"]) == null) | 82 | if ((SMTPConfig = m_Config.Configs["SMTP"]) == null) |
83 | { | 83 | { |
84 | m_log.InfoFormat("[SMTP] SMTP server not configured"); | 84 | m_log.InfoFormat("[SMTP] SMTP server not configured"); |
85 | m_Enabled = false; | 85 | m_Enabled = false; |
86 | return; | 86 | return; |
87 | } | 87 | } |
88 | 88 | ||
89 | if (!SMTPConfig.GetBoolean("enabled", false)) | 89 | if (!SMTPConfig.GetBoolean("enabled", false)) |
90 | { | 90 | { |
91 | m_log.InfoFormat("[SMTP] module disabled in configuration"); | 91 | m_log.InfoFormat("[SMTP] module disabled in configuration"); |
92 | m_Enabled = false; | 92 | m_Enabled = false; |
93 | return; | 93 | return; |
94 | } | 94 | } |
95 | 95 | ||
96 | m_HostName = SMTPConfig.GetString("host_domain_header_from", m_HostName); | 96 | m_HostName = SMTPConfig.GetString("host_domain_header_from", m_HostName); |
97 | SMTP_SERVER_HOSTNAME = SMTPConfig.GetString("SMTP_SERVER_HOSTNAME",SMTP_SERVER_HOSTNAME); | 97 | SMTP_SERVER_HOSTNAME = SMTPConfig.GetString("SMTP_SERVER_HOSTNAME",SMTP_SERVER_HOSTNAME); |
98 | SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT); | 98 | SMTP_SERVER_PORT = SMTPConfig.GetInt("SMTP_SERVER_PORT", SMTP_SERVER_PORT); |
99 | SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN); | 99 | SMTP_SERVER_LOGIN = SMTPConfig.GetString("SMTP_SERVER_LOGIN", SMTP_SERVER_LOGIN); |
100 | SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD); | 100 | SMTP_SERVER_PASSWORD = SMTPConfig.GetString("SMTP_SERVER_PASSWORD", SMTP_SERVER_PASSWORD); |
101 | } | 101 | } |
102 | catch (Exception e) | 102 | catch (Exception e) |
103 | { | 103 | { |
104 | m_log.Error("[EMAIL] DefaultEmailModule not configured: "+ e.Message); | 104 | m_log.Error("[EMAIL] DefaultEmailModule not configured: "+ e.Message); |
105 | m_Enabled = false; | 105 | m_Enabled = false; |
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | 108 | ||
109 | // It's a go! | 109 | // It's a go! |
110 | if (m_Enabled) | 110 | if (m_Enabled) |
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
124 | m_Scenes.Add(scene.RegionInfo.RegionHandle, scene); | 124 | m_Scenes.Add(scene.RegionInfo.RegionHandle, scene); |
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
128 | m_log.Info("[EMAIL] Activated DefaultEmailModule"); | 128 | m_log.Info("[EMAIL] Activated DefaultEmailModule"); |
129 | } | 129 | } |
130 | } | 130 | } |
@@ -152,14 +152,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
152 | /// </summary> | 152 | /// </summary> |
153 | /// <param name="seconds"></param> | 153 | /// <param name="seconds"></param> |
154 | private void DelayInSeconds(int seconds) | 154 | private void DelayInSeconds(int seconds) |
155 | { | 155 | { |
156 | TimeSpan DiffDelay = new TimeSpan(0, 0, seconds); | 156 | TimeSpan DiffDelay = new TimeSpan(0, 0, seconds); |
157 | DateTime EndDelay = DateTime.Now.Add(DiffDelay); | 157 | DateTime EndDelay = DateTime.Now.Add(DiffDelay); |
158 | while (DateTime.Now < EndDelay) | 158 | while (DateTime.Now < EndDelay) |
159 | { | 159 | { |
160 | ;//Do nothing!! | 160 | ;//Do nothing!! |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | private SceneObjectPart findPrim(LLUUID objectID, out string ObjectRegionName) | 164 | private SceneObjectPart findPrim(LLUUID objectID, out string ObjectRegionName) |
165 | { | 165 | { |
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
171 | if (part != null) | 171 | if (part != null) |
172 | { | 172 | { |
173 | ObjectRegionName = s.RegionInfo.RegionName; | 173 | ObjectRegionName = s.RegionInfo.RegionName; |
174 | return part; | 174 | return part; |
175 | } | 175 | } |
176 | } | 176 | } |
177 | } | 177 | } |
@@ -181,108 +181,108 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
181 | 181 | ||
182 | private void resolveNamePositionRegionName(LLUUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) | 182 | private void resolveNamePositionRegionName(LLUUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) |
183 | { | 183 | { |
184 | string m_ObjectRegionName; | 184 | string m_ObjectRegionName; |
185 | SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); | 185 | SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); |
186 | if (part != null) | 186 | if (part != null) |
187 | { | 187 | { |
188 | ObjectAbsolutePosition = part.AbsolutePosition.ToString(); | 188 | ObjectAbsolutePosition = part.AbsolutePosition.ToString(); |
189 | ObjectName = part.Name; | 189 | ObjectName = part.Name; |
190 | ObjectRegionName = m_ObjectRegionName; | 190 | ObjectRegionName = m_ObjectRegionName; |
191 | return; | 191 | return; |
192 | } | 192 | } |
193 | ObjectAbsolutePosition = part.AbsolutePosition.ToString(); | 193 | ObjectAbsolutePosition = part.AbsolutePosition.ToString(); |
194 | ObjectName = part.Name; | 194 | ObjectName = part.Name; |
195 | ObjectRegionName = m_ObjectRegionName; | 195 | ObjectRegionName = m_ObjectRegionName; |
196 | return; | 196 | return; |
197 | } | 197 | } |
198 | 198 | ||
199 | /// <summary> | 199 | /// <summary> |
200 | /// SendMail function utilized by llEMail | 200 | /// SendMail function utilized by llEMail |
201 | /// </summary> | 201 | /// </summary> |
202 | /// <param name="objectID"></param> | 202 | /// <param name="objectID"></param> |
203 | /// <param name="address"></param> | 203 | /// <param name="address"></param> |
204 | /// <param name="subject"></param> | 204 | /// <param name="subject"></param> |
205 | /// <param name="body"></param> | 205 | /// <param name="body"></param> |
206 | public void SendEmail(LLUUID objectID, string address, string subject, string body) | 206 | public void SendEmail(LLUUID objectID, string address, string subject, string body) |
207 | { | 207 | { |
208 | //Check if address is empty | 208 | //Check if address is empty |
209 | if (address == string.Empty) | 209 | if (address == string.Empty) |
210 | return; | 210 | return; |
211 | 211 | ||
212 | //FIXED:Check the email is correct form in REGEX | 212 | //FIXED:Check the email is correct form in REGEX |
213 | string EMailpatternStrict = @"^(([^<>()[\]\\.,;:\s@\""]+" | 213 | string EMailpatternStrict = @"^(([^<>()[\]\\.,;:\s@\""]+" |
214 | + @"(\.[^<>()[\]\\.,;:\s@\""]+)*)|(\"".+\""))@" | 214 | + @"(\.[^<>()[\]\\.,;:\s@\""]+)*)|(\"".+\""))@" |
215 | + @"((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" | 215 | + @"((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" |
216 | + @"\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+" | 216 | + @"\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+" |
217 | + @"[a-zA-Z]{2,}))$"; | 217 | + @"[a-zA-Z]{2,}))$"; |
218 | Regex EMailreStrict = new Regex(EMailpatternStrict); | 218 | Regex EMailreStrict = new Regex(EMailpatternStrict); |
219 | bool isEMailStrictMatch = EMailreStrict.IsMatch(address); | 219 | bool isEMailStrictMatch = EMailreStrict.IsMatch(address); |
220 | if (!isEMailStrictMatch) | 220 | if (!isEMailStrictMatch) |
221 | { | 221 | { |
222 | m_log.Error("[EMAIL] REGEX Problem in EMail Address: "+address); | 222 | m_log.Error("[EMAIL] REGEX Problem in EMail Address: "+address); |
223 | return; | 223 | return; |
224 | } | 224 | } |
225 | //FIXME:Check if subject + body = 4096 Byte | 225 | //FIXME:Check if subject + body = 4096 Byte |
226 | if ((subject.Length + body.Length) > 1024) | 226 | if ((subject.Length + body.Length) > 1024) |
227 | { | 227 | { |
228 | m_log.Error("[EMAIL] subject + body > 1024 Byte"); | 228 | m_log.Error("[EMAIL] subject + body > 1024 Byte"); |
229 | return; | 229 | return; |
230 | } | 230 | } |
231 | 231 | ||
232 | try | 232 | try |
233 | { | 233 | { |
234 | string LastObjectName = string.Empty; | 234 | string LastObjectName = string.Empty; |
235 | string LastObjectPosition = string.Empty; | 235 | string LastObjectPosition = string.Empty; |
236 | string LastObjectRegionName = string.Empty; | 236 | string LastObjectRegionName = string.Empty; |
237 | //DONE: Message as Second Life style | 237 | //DONE: Message as Second Life style |
238 | //20 second delay - AntiSpam System - for now only 10 seconds | 238 | //20 second delay - AntiSpam System - for now only 10 seconds |
239 | DelayInSeconds(10); | 239 | DelayInSeconds(10); |
240 | //Creation EmailMessage | 240 | //Creation EmailMessage |
241 | EmailMessage emailMessage = new EmailMessage(); | 241 | EmailMessage emailMessage = new EmailMessage(); |
242 | //From | 242 | //From |
243 | emailMessage.FromAddress = new EmailAddress(objectID.UUID.ToString()+"@"+m_HostName); | 243 | emailMessage.FromAddress = new EmailAddress(objectID.UUID.ToString()+"@"+m_HostName); |
244 | //To - Only One | 244 | //To - Only One |
245 | emailMessage.AddToAddress(new EmailAddress(address)); | 245 | emailMessage.AddToAddress(new EmailAddress(address)); |
246 | //Subject | 246 | //Subject |
247 | emailMessage.Subject = subject; | 247 | emailMessage.Subject = subject; |
248 | //TEXT Body | 248 | //TEXT Body |
249 | resolveNamePositionRegionName(objectID, out LastObjectName, out LastObjectPosition, out LastObjectRegionName); | 249 | resolveNamePositionRegionName(objectID, out LastObjectName, out LastObjectPosition, out LastObjectRegionName); |
250 | emailMessage.TextPart = new TextAttachment("Object-Name: " + LastObjectName + | 250 | emailMessage.TextPart = new TextAttachment("Object-Name: " + LastObjectName + |
251 | "\r\nRegion: " + LastObjectRegionName + "\r\nLocal-Position: " + | 251 | "\r\nRegion: " + LastObjectRegionName + "\r\nLocal-Position: " + |
252 | LastObjectPosition+"\r\n\r\n\r\n" + body); | 252 | LastObjectPosition+"\r\n\r\n\r\n" + body); |
253 | //HTML Body | 253 | //HTML Body |
254 | emailMessage.HtmlPart = new HtmlAttachment("<html><body><p>" + | 254 | emailMessage.HtmlPart = new HtmlAttachment("<html><body><p>" + |
255 | "<BR>Object-Name: " + LastObjectName + | 255 | "<BR>Object-Name: " + LastObjectName + |
256 | "<BR>Region: " + LastObjectRegionName + | 256 | "<BR>Region: " + LastObjectRegionName + |
257 | "<BR>Local-Position: " + LastObjectPosition + "<BR><BR><BR>" | 257 | "<BR>Local-Position: " + LastObjectPosition + "<BR><BR><BR>" |
258 | +body+"\r\n</p></body><html>"); | 258 | +body+"\r\n</p></body><html>"); |
259 | 259 | ||
260 | //Set SMTP SERVER config | 260 | //Set SMTP SERVER config |
261 | SmtpServer smtpServer=new SmtpServer(SMTP_SERVER_HOSTNAME,SMTP_SERVER_PORT); | 261 | SmtpServer smtpServer=new SmtpServer(SMTP_SERVER_HOSTNAME,SMTP_SERVER_PORT); |
262 | //Authentication | 262 | //Authentication |
263 | smtpServer.SmtpAuthToken=new SmtpAuthToken(SMTP_SERVER_LOGIN, SMTP_SERVER_PASSWORD); | 263 | smtpServer.SmtpAuthToken=new SmtpAuthToken(SMTP_SERVER_LOGIN, SMTP_SERVER_PASSWORD); |
264 | //Send Email Message | 264 | //Send Email Message |
265 | emailMessage.Send(smtpServer); | 265 | emailMessage.Send(smtpServer); |
266 | //Log | 266 | //Log |
267 | m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.UUID.ToString()); | 267 | m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.UUID.ToString()); |
268 | } | 268 | } |
269 | catch (Exception e) | 269 | catch (Exception e) |
270 | { | 270 | { |
271 | m_log.Error("[EMAIL] DefaultEmailModule Exception: "+e.Message); | 271 | m_log.Error("[EMAIL] DefaultEmailModule Exception: "+e.Message); |
272 | return; | 272 | return; |
273 | } | 273 | } |
274 | } | 274 | } |
275 | 275 | ||
276 | /// <summary> | 276 | /// <summary> |
277 | /// | 277 | /// |
278 | /// </summary> | 278 | /// </summary> |
279 | /// <param name="objectID"></param> | 279 | /// <param name="objectID"></param> |
280 | /// <param name="sender"></param> | 280 | /// <param name="sender"></param> |
281 | /// <param name="subject"></param> | 281 | /// <param name="subject"></param> |
282 | /// <returns></returns> | 282 | /// <returns></returns> |
283 | public Email GetNextEmail(LLUUID objectID, string sender, string subject) | 283 | public Email GetNextEmail(LLUUID objectID, string sender, string subject) |
284 | { | 284 | { |
285 | return null; | 285 | return null; |
286 | } | 286 | } |
287 | } | 287 | } |
288 | } | 288 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs index 81d85d2..2704224 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class AssetsArchiver | 41 | public class AssetsArchiver |
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Archive assets | 46 | /// Archive assets |
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 3996fb3..c0fdc05 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
52 | //SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) | 52 | //SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) |
53 | 53 | ||
54 | uint sun = 0; | 54 | uint sun = 0; |
55 | if(!m_scene.RegionInfo.EstateSettings.UseGlobalTime) | 55 | if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) |
56 | sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800; | 56 | sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800; |
57 | remote_client.SendDetailedEstateData(invoice, | 57 | remote_client.SendDetailedEstateData(invoice, |
58 | m_scene.RegionInfo.EstateSettings.EstateName, | 58 | m_scene.RegionInfo.EstateSettings.EstateName, |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
98 | 98 | ||
99 | m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; | 99 | m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; |
100 | 100 | ||
101 | if(matureLevel <= 13) | 101 | if (matureLevel <= 13) |
102 | m_scene.RegionInfo.RegionSettings.Maturity = 0; | 102 | m_scene.RegionInfo.RegionSettings.Maturity = 0; |
103 | else | 103 | else |
104 | m_scene.RegionInfo.RegionSettings.Maturity = 1; | 104 | m_scene.RegionInfo.RegionSettings.Maturity = 1; |
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
245 | ScenePresence s = m_scene.GetScenePresence(user); | 245 | ScenePresence s = m_scene.GetScenePresence(user); |
246 | if (s != null) | 246 | if (s != null) |
247 | { | 247 | { |
248 | if(!s.IsChildAgent) | 248 | if (!s.IsChildAgent) |
249 | m_scene.TeleportClientHome(user, s.ControllingClient); | 249 | m_scene.TeleportClientHome(user, s.ControllingClient); |
250 | } | 250 | } |
251 | 251 | ||
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
395 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY; | 395 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY; |
396 | args.regionFlags = GetRegionFlags(); | 396 | args.regionFlags = GetRegionFlags(); |
397 | byte mature = 13; | 397 | byte mature = 13; |
398 | if(m_scene.RegionInfo.RegionSettings.Maturity == 1) | 398 | if (m_scene.RegionInfo.RegionSettings.Maturity == 1) |
399 | mature = 21; | 399 | mature = 21; |
400 | args.simAccess = mature; | 400 | args.simAccess = mature; |
401 | 401 | ||
@@ -550,7 +550,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
550 | args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE; | 550 | args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE; |
551 | args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE; | 551 | args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE; |
552 | byte mature = 13; | 552 | byte mature = 13; |
553 | if(m_scene.RegionInfo.RegionSettings.Maturity == 1) | 553 | if (m_scene.RegionInfo.RegionSettings.Maturity == 1) |
554 | mature = 21; | 554 | mature = 21; |
555 | args.simAccess = mature; | 555 | args.simAccess = mature; |
556 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; | 556 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; |
@@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
579 | 579 | ||
580 | public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2) | 580 | public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2) |
581 | { | 581 | { |
582 | if(parms2 == 0) | 582 | if (parms2 == 0) |
583 | { | 583 | { |
584 | m_scene.RegionInfo.EstateSettings.UseGlobalTime = true; | 584 | m_scene.RegionInfo.EstateSettings.UseGlobalTime = true; |
585 | m_scene.RegionInfo.EstateSettings.SunPosition = 0.0; | 585 | m_scene.RegionInfo.EstateSettings.SunPosition = 0.0; |
@@ -590,37 +590,37 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
590 | m_scene.RegionInfo.EstateSettings.SunPosition = (double)(parms2 - 0x1800)/1024.0; | 590 | m_scene.RegionInfo.EstateSettings.SunPosition = (double)(parms2 - 0x1800)/1024.0; |
591 | } | 591 | } |
592 | 592 | ||
593 | if((parms1 & 0x00000010) != 0) | 593 | if ((parms1 & 0x00000010) != 0) |
594 | m_scene.RegionInfo.EstateSettings.FixedSun = true; | 594 | m_scene.RegionInfo.EstateSettings.FixedSun = true; |
595 | else | 595 | else |
596 | m_scene.RegionInfo.EstateSettings.FixedSun = false; | 596 | m_scene.RegionInfo.EstateSettings.FixedSun = false; |
597 | 597 | ||
598 | if((parms1 & 0x00008000) != 0) | 598 | if ((parms1 & 0x00008000) != 0) |
599 | m_scene.RegionInfo.EstateSettings.PublicAccess = true; | 599 | m_scene.RegionInfo.EstateSettings.PublicAccess = true; |
600 | else | 600 | else |
601 | m_scene.RegionInfo.EstateSettings.PublicAccess = false; | 601 | m_scene.RegionInfo.EstateSettings.PublicAccess = false; |
602 | 602 | ||
603 | if((parms1 & 0x10000000) != 0) | 603 | if ((parms1 & 0x10000000) != 0) |
604 | m_scene.RegionInfo.EstateSettings.AllowVoice = true; | 604 | m_scene.RegionInfo.EstateSettings.AllowVoice = true; |
605 | else | 605 | else |
606 | m_scene.RegionInfo.EstateSettings.AllowVoice = false; | 606 | m_scene.RegionInfo.EstateSettings.AllowVoice = false; |
607 | 607 | ||
608 | if((parms1 & 0x00100000) != 0) | 608 | if ((parms1 & 0x00100000) != 0) |
609 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true; | 609 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true; |
610 | else | 610 | else |
611 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false; | 611 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false; |
612 | 612 | ||
613 | if((parms1 & 0x00800000) != 0) | 613 | if ((parms1 & 0x00800000) != 0) |
614 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = true; | 614 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = true; |
615 | else | 615 | else |
616 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = false; | 616 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = false; |
617 | 617 | ||
618 | if((parms1 & 0x01000000) != 0) | 618 | if ((parms1 & 0x01000000) != 0) |
619 | m_scene.RegionInfo.EstateSettings.DenyIdentified = true; | 619 | m_scene.RegionInfo.EstateSettings.DenyIdentified = true; |
620 | else | 620 | else |
621 | m_scene.RegionInfo.EstateSettings.DenyIdentified = false; | 621 | m_scene.RegionInfo.EstateSettings.DenyIdentified = false; |
622 | 622 | ||
623 | if((parms1 & 0x02000000) != 0) | 623 | if ((parms1 & 0x02000000) != 0) |
624 | m_scene.RegionInfo.EstateSettings.DenyTransacted = true; | 624 | m_scene.RegionInfo.EstateSettings.DenyTransacted = true; |
625 | else | 625 | else |
626 | m_scene.RegionInfo.EstateSettings.DenyTransacted = false; | 626 | m_scene.RegionInfo.EstateSettings.DenyTransacted = false; |
@@ -628,10 +628,10 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
628 | m_scene.RegionInfo.EstateSettings.Save(); | 628 | m_scene.RegionInfo.EstateSettings.Save(); |
629 | 629 | ||
630 | float sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition; | 630 | float sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition; |
631 | if(m_scene.RegionInfo.RegionSettings.UseEstateSun) | 631 | if (m_scene.RegionInfo.RegionSettings.UseEstateSun) |
632 | { | 632 | { |
633 | sun = (float)m_scene.RegionInfo.EstateSettings.SunPosition; | 633 | sun = (float)m_scene.RegionInfo.EstateSettings.SunPosition; |
634 | if(m_scene.RegionInfo.EstateSettings.UseGlobalTime) | 634 | if (m_scene.RegionInfo.EstateSettings.UseGlobalTime) |
635 | sun = m_scene.EventManager.GetSunLindenHour(); | 635 | sun = m_scene.EventManager.GetSunLindenHour(); |
636 | } | 636 | } |
637 | 637 | ||
@@ -726,30 +726,30 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
726 | 726 | ||
727 | // Fully implemented | 727 | // Fully implemented |
728 | // | 728 | // |
729 | if(m_scene.RegionInfo.RegionSettings.AllowDamage) | 729 | if (m_scene.RegionInfo.RegionSettings.AllowDamage) |
730 | flags |= Simulator.RegionFlags.AllowDamage; | 730 | flags |= Simulator.RegionFlags.AllowDamage; |
731 | if(m_scene.RegionInfo.RegionSettings.BlockTerraform) | 731 | if (m_scene.RegionInfo.RegionSettings.BlockTerraform) |
732 | flags |= Simulator.RegionFlags.BlockTerraform; | 732 | flags |= Simulator.RegionFlags.BlockTerraform; |
733 | if(!m_scene.RegionInfo.RegionSettings.AllowLandResell) | 733 | if (!m_scene.RegionInfo.RegionSettings.AllowLandResell) |
734 | flags |= Simulator.RegionFlags.BlockLandResell; | 734 | flags |= Simulator.RegionFlags.BlockLandResell; |
735 | if(m_scene.RegionInfo.RegionSettings.DisableCollisions) | 735 | if (m_scene.RegionInfo.RegionSettings.DisableCollisions) |
736 | flags |= Simulator.RegionFlags.SkipCollisions; | 736 | flags |= Simulator.RegionFlags.SkipCollisions; |
737 | if(m_scene.RegionInfo.RegionSettings.DisableScripts) | 737 | if (m_scene.RegionInfo.RegionSettings.DisableScripts) |
738 | flags |= Simulator.RegionFlags.SkipScripts; | 738 | flags |= Simulator.RegionFlags.SkipScripts; |
739 | if(m_scene.RegionInfo.RegionSettings.DisablePhysics) | 739 | if (m_scene.RegionInfo.RegionSettings.DisablePhysics) |
740 | flags |= Simulator.RegionFlags.SkipPhysics; | 740 | flags |= Simulator.RegionFlags.SkipPhysics; |
741 | if(m_scene.RegionInfo.RegionSettings.BlockFly) | 741 | if (m_scene.RegionInfo.RegionSettings.BlockFly) |
742 | flags |= Simulator.RegionFlags.NoFly; | 742 | flags |= Simulator.RegionFlags.NoFly; |
743 | if(m_scene.RegionInfo.RegionSettings.RestrictPushing) | 743 | if (m_scene.RegionInfo.RegionSettings.RestrictPushing) |
744 | flags |= Simulator.RegionFlags.RestrictPushObject; | 744 | flags |= Simulator.RegionFlags.RestrictPushObject; |
745 | if(m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) | 745 | if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) |
746 | flags |= Simulator.RegionFlags.AllowParcelChanges; | 746 | flags |= Simulator.RegionFlags.AllowParcelChanges; |
747 | if(m_scene.RegionInfo.RegionSettings.BlockShowInSearch) | 747 | if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) |
748 | flags |= (Simulator.RegionFlags)(1 << 29); | 748 | flags |= (Simulator.RegionFlags)(1 << 29); |
749 | 749 | ||
750 | if(m_scene.RegionInfo.RegionSettings.FixedSun) | 750 | if (m_scene.RegionInfo.RegionSettings.FixedSun) |
751 | flags |= Simulator.RegionFlags.SunFixed; | 751 | flags |= Simulator.RegionFlags.SunFixed; |
752 | if(m_scene.RegionInfo.RegionSettings.Sandbox) | 752 | if (m_scene.RegionInfo.RegionSettings.Sandbox) |
753 | flags |= Simulator.RegionFlags.Sandbox; | 753 | flags |= Simulator.RegionFlags.Sandbox; |
754 | 754 | ||
755 | // Handled in LandObject.cs: AllowLandmark | 755 | // Handled in LandObject.cs: AllowLandmark |
@@ -769,30 +769,30 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
769 | { | 769 | { |
770 | Simulator.RegionFlags flags = Simulator.RegionFlags.None; | 770 | Simulator.RegionFlags flags = Simulator.RegionFlags.None; |
771 | 771 | ||
772 | if(m_scene.RegionInfo.EstateSettings.FixedSun) | 772 | if (m_scene.RegionInfo.EstateSettings.FixedSun) |
773 | flags |= Simulator.RegionFlags.SunFixed; | 773 | flags |= Simulator.RegionFlags.SunFixed; |
774 | if(m_scene.RegionInfo.EstateSettings.PublicAccess) | 774 | if (m_scene.RegionInfo.EstateSettings.PublicAccess) |
775 | flags |= (Simulator.RegionFlags.PublicAllowed | | 775 | flags |= (Simulator.RegionFlags.PublicAllowed | |
776 | Simulator.RegionFlags.ExternallyVisible); | 776 | Simulator.RegionFlags.ExternallyVisible); |
777 | if(m_scene.RegionInfo.EstateSettings.AllowVoice) | 777 | if (m_scene.RegionInfo.EstateSettings.AllowVoice) |
778 | flags |= Simulator.RegionFlags.AllowVoice; | 778 | flags |= Simulator.RegionFlags.AllowVoice; |
779 | if(m_scene.RegionInfo.EstateSettings.AllowDirectTeleport) | 779 | if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport) |
780 | flags |= Simulator.RegionFlags.AllowDirectTeleport; | 780 | flags |= Simulator.RegionFlags.AllowDirectTeleport; |
781 | if(m_scene.RegionInfo.EstateSettings.DenyAnonymous) | 781 | if (m_scene.RegionInfo.EstateSettings.DenyAnonymous) |
782 | flags |= Simulator.RegionFlags.DenyAnonymous; | 782 | flags |= Simulator.RegionFlags.DenyAnonymous; |
783 | if(m_scene.RegionInfo.EstateSettings.DenyIdentified) | 783 | if (m_scene.RegionInfo.EstateSettings.DenyIdentified) |
784 | flags |= Simulator.RegionFlags.DenyIdentified; | 784 | flags |= Simulator.RegionFlags.DenyIdentified; |
785 | if(m_scene.RegionInfo.EstateSettings.DenyTransacted) | 785 | if (m_scene.RegionInfo.EstateSettings.DenyTransacted) |
786 | flags |= Simulator.RegionFlags.DenyTransacted; | 786 | flags |= Simulator.RegionFlags.DenyTransacted; |
787 | if(m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner) | 787 | if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner) |
788 | flags |= Simulator.RegionFlags.AbuseEmailToEstateOwner; | 788 | flags |= Simulator.RegionFlags.AbuseEmailToEstateOwner; |
789 | if(m_scene.RegionInfo.EstateSettings.BlockDwell) | 789 | if (m_scene.RegionInfo.EstateSettings.BlockDwell) |
790 | flags |= Simulator.RegionFlags.BlockDwell; | 790 | flags |= Simulator.RegionFlags.BlockDwell; |
791 | if(m_scene.RegionInfo.EstateSettings.EstateSkipScripts) | 791 | if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts) |
792 | flags |= Simulator.RegionFlags.EstateSkipScripts; | 792 | flags |= Simulator.RegionFlags.EstateSkipScripts; |
793 | if(m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) | 793 | if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) |
794 | flags |= Simulator.RegionFlags.ResetHomeOnTeleport; | 794 | flags |= Simulator.RegionFlags.ResetHomeOnTeleport; |
795 | if(m_scene.RegionInfo.EstateSettings.TaxFree) | 795 | if (m_scene.RegionInfo.EstateSettings.TaxFree) |
796 | flags |= Simulator.RegionFlags.TaxFree; | 796 | flags |= Simulator.RegionFlags.TaxFree; |
797 | 797 | ||
798 | return (uint)flags; | 798 | return (uint)flags; |
@@ -804,7 +804,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
804 | return true; | 804 | return true; |
805 | 805 | ||
806 | List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); | 806 | List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); |
807 | if(ems.Contains(avatarID)) | 807 | if (ems.Contains(avatarID)) |
808 | return true; | 808 | return true; |
809 | 809 | ||
810 | return false; | 810 | return false; |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 5aed2a7..02d74e5 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -163,11 +163,11 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
163 | { | 163 | { |
164 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); | 164 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); |
165 | uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); | 165 | uint regionFlags = 336723974 & ~((uint)(Simulator.RegionFlags.AllowLandmark | Simulator.RegionFlags.AllowSetHome)); |
166 | if(estateModule != null) | 166 | if (estateModule != null) |
167 | regionFlags = estateModule.GetRegionFlags(); | 167 | regionFlags = estateModule.GetRegionFlags(); |
168 | if((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) | 168 | if ((landData.landFlags & (uint)Parcel.ParcelFlags.AllowLandmark) != 0) |
169 | regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; | 169 | regionFlags |= (uint)Simulator.RegionFlags.AllowLandmark; |
170 | if(landData.ownerID == remote_client.AgentId) | 170 | if (landData.ownerID == remote_client.AgentId) |
171 | regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; | 171 | regionFlags |= (uint)Simulator.RegionFlags.AllowSetHome; |
172 | remote_client.SendLandProperties(remote_client, sequence_id, | 172 | remote_client.SendLandProperties(remote_client, sequence_id, |
173 | snap_selection, request_result, landData, | 173 | snap_selection, request_result, landData, |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 399cbf6..7df70a0 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -1365,7 +1365,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1365 | // We need to explicitly resend the newly link prim's object properties since no other actions | 1365 | // We need to explicitly resend the newly link prim's object properties since no other actions |
1366 | // occur on link to invoke this elsewhere (such as object selection) | 1366 | // occur on link to invoke this elsewhere (such as object selection) |
1367 | parenPrim.TriggerScriptChangedEvent(Changed.LINK); | 1367 | parenPrim.TriggerScriptChangedEvent(Changed.LINK); |
1368 | if(client != null) | 1368 | if (client != null) |
1369 | parenPrim.GetProperties(client); | 1369 | parenPrim.GetProperties(client); |
1370 | else | 1370 | else |
1371 | { | 1371 | { |
@@ -1426,13 +1426,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1426 | parenPrim.DelinkFromGroup(childPrimId, sendEvents); | 1426 | parenPrim.DelinkFromGroup(childPrimId, sendEvents); |
1427 | } | 1427 | } |
1428 | 1428 | ||
1429 | if(parenPrim.Children.Count == 1) | 1429 | if (parenPrim.Children.Count == 1) |
1430 | { | 1430 | { |
1431 | // The link set has been completely torn down | 1431 | // The link set has been completely torn down |
1432 | // This is the case if you select a link set and delink | 1432 | // This is the case if you select a link set and delink |
1433 | // | 1433 | // |
1434 | parenPrim.RootPart.LinkNum = 1; | 1434 | parenPrim.RootPart.LinkNum = 1; |
1435 | if(sendEvents) | 1435 | if (sendEvents) |
1436 | parenPrim.TriggerScriptChangedEvent(Changed.LINK); | 1436 | parenPrim.TriggerScriptChangedEvent(Changed.LINK); |
1437 | } | 1437 | } |
1438 | else | 1438 | else |
@@ -1449,7 +1449,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1449 | 1449 | ||
1450 | // Tear down the remaining link set | 1450 | // Tear down the remaining link set |
1451 | // | 1451 | // |
1452 | if(unlink_ids.Count == 2) | 1452 | if (unlink_ids.Count == 2) |
1453 | { | 1453 | { |
1454 | DelinkObjects(unlink_ids, true); | 1454 | DelinkObjects(unlink_ids, true); |
1455 | return; | 1455 | return; |
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1494 | { | 1494 | { |
1495 | grp.DelinkFromGroup(primIds[i]); | 1495 | grp.DelinkFromGroup(primIds[i]); |
1496 | delinkedSomething = true; | 1496 | delinkedSomething = true; |
1497 | if(!parents.Contains(grp)) | 1497 | if (!parents.Contains(grp)) |
1498 | parents.Add(grp); | 1498 | parents.Add(grp); |
1499 | } | 1499 | } |
1500 | 1500 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 0cf2016..5caf0f0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -1693,7 +1693,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1693 | } | 1693 | } |
1694 | 1694 | ||
1695 | // Finally remove the item, for reals this time. | 1695 | // Finally remove the item, for reals this time. |
1696 | if(permissionToDelete) | 1696 | if (permissionToDelete) |
1697 | DeleteSceneObject(objectGroup); | 1697 | DeleteSceneObject(objectGroup); |
1698 | } | 1698 | } |
1699 | 1699 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ae5a3c7..7ff5024 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -88,8 +88,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
88 | /// Are we applying physics to any of the prims in this scene? | 88 | /// Are we applying physics to any of the prims in this scene? |
89 | /// </summary> | 89 | /// </summary> |
90 | public bool m_physicalPrim; | 90 | public bool m_physicalPrim; |
91 | public float m_maxNonphys = 65536; | 91 | public float m_maxNonphys = 65536; |
92 | public float m_maxPhys = 10; | 92 | public float m_maxPhys = 10; |
93 | 93 | ||
94 | public bool m_seeIntoRegionFromNeighbor; | 94 | public bool m_seeIntoRegionFromNeighbor; |
95 | public int MaxUndoCount = 5; | 95 | public int MaxUndoCount = 5; |
@@ -272,7 +272,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
272 | 272 | ||
273 | // Load region settings | 273 | // Load region settings |
274 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 274 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
275 | if(m_storageManager.EstateDataStore != null) | 275 | if (m_storageManager.EstateDataStore != null) |
276 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); | 276 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); |
277 | 277 | ||
278 | 278 | ||
@@ -311,16 +311,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() | 311 | + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() |
312 | + " PhysPrim:" + m_physicalPrim.ToString(); | 312 | + " PhysPrim:" + m_physicalPrim.ToString(); |
313 | 313 | ||
314 | try | 314 | try |
315 | { | 315 | { |
316 | IConfig startupConfig = m_config.Configs["Startup"]; | 316 | IConfig startupConfig = m_config.Configs["Startup"]; |
317 | m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f); | 317 | m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f); |
318 | m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f); | 318 | m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f); |
319 | } | 319 | } |
320 | catch (Exception) | 320 | catch (Exception) |
321 | { | 321 | { |
322 | m_log.Warn("Failed to load StartupConfig"); | 322 | m_log.Warn("Failed to load StartupConfig"); |
323 | } | 323 | } |
324 | 324 | ||
325 | } | 325 | } |
326 | 326 | ||
@@ -2505,8 +2505,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2505 | /// <param name="capsObjectPath"></param> | 2505 | /// <param name="capsObjectPath"></param> |
2506 | public void AddCapsHandler(LLUUID agentId) | 2506 | public void AddCapsHandler(LLUUID agentId) |
2507 | { | 2507 | { |
2508 | if(RegionInfo.EstateSettings.IsBanned(agentId)) | 2508 | if (RegionInfo.EstateSettings.IsBanned(agentId)) |
2509 | return; | 2509 | return; |
2510 | String capsObjectPath = GetCapsPath(agentId); | 2510 | String capsObjectPath = GetCapsPath(agentId); |
2511 | 2511 | ||
2512 | m_log.DebugFormat( | 2512 | m_log.DebugFormat( |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index c2ce9d8..87e69f7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
427 | if (reader.Name == "SceneObjectPart") | 427 | if (reader.Name == "SceneObjectPart") |
428 | { | 428 | { |
429 | SceneObjectPart Part = SceneObjectPart.FromXml(reader); | 429 | SceneObjectPart Part = SceneObjectPart.FromXml(reader); |
430 | if(m_rootPart.LinkNum == 0) | 430 | if (m_rootPart.LinkNum == 0) |
431 | m_rootPart.LinkNum++; | 431 | m_rootPart.LinkNum++; |
432 | AddPart(Part); | 432 | AddPart(Part); |
433 | Part.LinkNum = m_parts.Count; | 433 | Part.LinkNum = m_parts.Count; |
@@ -833,7 +833,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
833 | 833 | ||
834 | part.LinkNum = m_parts.Count; | 834 | part.LinkNum = m_parts.Count; |
835 | 835 | ||
836 | if(part.LinkNum == 2 && RootPart != null) | 836 | if (part.LinkNum == 2 && RootPart != null) |
837 | RootPart.LinkNum = 1; | 837 | RootPart.LinkNum = 1; |
838 | } | 838 | } |
839 | } | 839 | } |
@@ -1745,7 +1745,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1745 | linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); | 1745 | linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); |
1746 | 1746 | ||
1747 | linkPart.ParentID = m_rootPart.LocalId; | 1747 | linkPart.ParentID = m_rootPart.LocalId; |
1748 | if(m_rootPart.LinkNum == 0) | 1748 | if (m_rootPart.LinkNum == 0) |
1749 | m_rootPart.LinkNum = 1; | 1749 | m_rootPart.LinkNum = 1; |
1750 | 1750 | ||
1751 | lock (m_parts) | 1751 | lock (m_parts) |
@@ -1815,13 +1815,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
1815 | m_parts.Remove(linkPart.UUID); | 1815 | m_parts.Remove(linkPart.UUID); |
1816 | } | 1816 | } |
1817 | 1817 | ||
1818 | if(m_parts.Count == 1 && RootPart != null) //Single prim is left | 1818 | if (m_parts.Count == 1 && RootPart != null) //Single prim is left |
1819 | RootPart.LinkNum = 0; | 1819 | RootPart.LinkNum = 0; |
1820 | else | 1820 | else |
1821 | { | 1821 | { |
1822 | foreach (SceneObjectPart p in m_parts.Values) | 1822 | foreach (SceneObjectPart p in m_parts.Values) |
1823 | if(p.LinkNum > linkPart.LinkNum) | 1823 | { |
1824 | if (p.LinkNum > linkPart.LinkNum) | ||
1824 | p.LinkNum--; | 1825 | p.LinkNum--; |
1826 | } | ||
1825 | } | 1827 | } |
1826 | 1828 | ||
1827 | linkPart.ParentID = 0; | 1829 | linkPart.ParentID = 0; |
@@ -1858,7 +1860,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1858 | 1860 | ||
1859 | m_scene.AddNewSceneObject(objectGroup, true); | 1861 | m_scene.AddNewSceneObject(objectGroup, true); |
1860 | 1862 | ||
1861 | if(sendEvents) | 1863 | if (sendEvents) |
1862 | linkPart.TriggerScriptChangedEvent(Changed.LINK); | 1864 | linkPart.TriggerScriptChangedEvent(Changed.LINK); |
1863 | 1865 | ||
1864 | HasGroupChanged = true; | 1866 | HasGroupChanged = true; |
@@ -2131,11 +2133,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2131 | /// <param name="localID"></param> | 2133 | /// <param name="localID"></param> |
2132 | public void Resize(LLVector3 scale, uint localID) | 2134 | public void Resize(LLVector3 scale, uint localID) |
2133 | { | 2135 | { |
2134 | if(scale.X > m_scene.m_maxNonphys) | 2136 | if (scale.X > m_scene.m_maxNonphys) |
2135 | scale.X = m_scene.m_maxNonphys; | 2137 | scale.X = m_scene.m_maxNonphys; |
2136 | if(scale.Y > m_scene.m_maxNonphys) | 2138 | if (scale.Y > m_scene.m_maxNonphys) |
2137 | scale.Y = m_scene.m_maxNonphys; | 2139 | scale.Y = m_scene.m_maxNonphys; |
2138 | if(scale.Z > m_scene.m_maxNonphys) | 2140 | if (scale.Z > m_scene.m_maxNonphys) |
2139 | scale.Z = m_scene.m_maxNonphys; | 2141 | scale.Z = m_scene.m_maxNonphys; |
2140 | 2142 | ||
2141 | SceneObjectPart part = GetChildPart(localID); | 2143 | SceneObjectPart part = GetChildPart(localID); |
@@ -2144,13 +2146,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
2144 | part.Resize(scale); | 2146 | part.Resize(scale); |
2145 | if (part.PhysActor != null) | 2147 | if (part.PhysActor != null) |
2146 | { | 2148 | { |
2147 | if(part.PhysActor.IsPhysical) | 2149 | if (part.PhysActor.IsPhysical) |
2148 | { | 2150 | { |
2149 | if(scale.X > m_scene.m_maxPhys) | 2151 | if (scale.X > m_scene.m_maxPhys) |
2150 | scale.X = m_scene.m_maxPhys; | 2152 | scale.X = m_scene.m_maxPhys; |
2151 | if(scale.Y > m_scene.m_maxPhys) | 2153 | if (scale.Y > m_scene.m_maxPhys) |
2152 | scale.Y = m_scene.m_maxPhys; | 2154 | scale.Y = m_scene.m_maxPhys; |
2153 | if(scale.Z > m_scene.m_maxPhys) | 2155 | if (scale.Z > m_scene.m_maxPhys) |
2154 | scale.Z = m_scene.m_maxPhys; | 2156 | scale.Z = m_scene.m_maxPhys; |
2155 | } | 2157 | } |
2156 | part.PhysActor.Size = | 2158 | part.PhysActor.Size = |
@@ -2179,19 +2181,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
2179 | SceneObjectPart part = GetChildPart(localID); | 2181 | SceneObjectPart part = GetChildPart(localID); |
2180 | if (part != null) | 2182 | if (part != null) |
2181 | { | 2183 | { |
2182 | if(scale.X > m_scene.m_maxNonphys) | 2184 | if (scale.X > m_scene.m_maxNonphys) |
2183 | scale.X = m_scene.m_maxNonphys; | 2185 | scale.X = m_scene.m_maxNonphys; |
2184 | if(scale.Y > m_scene.m_maxNonphys) | 2186 | if (scale.Y > m_scene.m_maxNonphys) |
2185 | scale.Y = m_scene.m_maxNonphys; | 2187 | scale.Y = m_scene.m_maxNonphys; |
2186 | if(scale.Z > m_scene.m_maxNonphys) | 2188 | if (scale.Z > m_scene.m_maxNonphys) |
2187 | scale.Z = m_scene.m_maxNonphys; | 2189 | scale.Z = m_scene.m_maxNonphys; |
2188 | if(part.PhysActor != null && part.PhysActor.IsPhysical) | 2190 | if (part.PhysActor != null && part.PhysActor.IsPhysical) |
2189 | { | 2191 | { |
2190 | if(scale.X > m_scene.m_maxPhys) | 2192 | if (scale.X > m_scene.m_maxPhys) |
2191 | scale.X = m_scene.m_maxPhys; | 2193 | scale.X = m_scene.m_maxPhys; |
2192 | if(scale.Y > m_scene.m_maxPhys) | 2194 | if (scale.Y > m_scene.m_maxPhys) |
2193 | scale.Y = m_scene.m_maxPhys; | 2195 | scale.Y = m_scene.m_maxPhys; |
2194 | if(scale.Z > m_scene.m_maxPhys) | 2196 | if (scale.Z > m_scene.m_maxPhys) |
2195 | scale.Z = m_scene.m_maxPhys; | 2197 | scale.Z = m_scene.m_maxPhys; |
2196 | } | 2198 | } |
2197 | float x = (scale.X / part.Scale.X); | 2199 | float x = (scale.X / part.Scale.X); |
@@ -2200,7 +2202,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2200 | 2202 | ||
2201 | lock (m_parts) | 2203 | lock (m_parts) |
2202 | { | 2204 | { |
2203 | if(x > 1.0f || y > 1.0f || z > 1.0f) | 2205 | if (x > 1.0f || y > 1.0f || z > 1.0f) |
2204 | { | 2206 | { |
2205 | foreach (SceneObjectPart obPart in m_parts.Values) | 2207 | foreach (SceneObjectPart obPart in m_parts.Values) |
2206 | { | 2208 | { |
@@ -2211,9 +2213,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
2211 | float f = 1.0f; | 2213 | float f = 1.0f; |
2212 | float a = 1.0f; | 2214 | float a = 1.0f; |
2213 | 2215 | ||
2214 | if(part.PhysActor != null && part.PhysActor.IsPhysical) | 2216 | if (part.PhysActor != null && part.PhysActor.IsPhysical) |
2215 | { | 2217 | { |
2216 | if(oldSize.X*x > m_scene.m_maxPhys) | 2218 | if (oldSize.X*x > m_scene.m_maxPhys) |
2217 | { | 2219 | { |
2218 | f = m_scene.m_maxPhys / oldSize.X; | 2220 | f = m_scene.m_maxPhys / oldSize.X; |
2219 | a = f / x; | 2221 | a = f / x; |
@@ -2221,7 +2223,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2221 | y *= a; | 2223 | y *= a; |
2222 | z *= a; | 2224 | z *= a; |
2223 | } | 2225 | } |
2224 | if(oldSize.Y*y > m_scene.m_maxPhys) | 2226 | if (oldSize.Y*y > m_scene.m_maxPhys) |
2225 | { | 2227 | { |
2226 | f = m_scene.m_maxPhys / oldSize.Y; | 2228 | f = m_scene.m_maxPhys / oldSize.Y; |
2227 | a = f / y; | 2229 | a = f / y; |
@@ -2229,7 +2231,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2229 | y *= a; | 2231 | y *= a; |
2230 | z *= a; | 2232 | z *= a; |
2231 | } | 2233 | } |
2232 | if(oldSize.Z*z > m_scene.m_maxPhys) | 2234 | if (oldSize.Z*z > m_scene.m_maxPhys) |
2233 | { | 2235 | { |
2234 | f = m_scene.m_maxPhys / oldSize.Z; | 2236 | f = m_scene.m_maxPhys / oldSize.Z; |
2235 | a = f / z; | 2237 | a = f / z; |
@@ -2240,7 +2242,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2240 | } | 2242 | } |
2241 | else | 2243 | else |
2242 | { | 2244 | { |
2243 | if(oldSize.X*x > m_scene.m_maxNonphys) | 2245 | if (oldSize.X*x > m_scene.m_maxNonphys) |
2244 | { | 2246 | { |
2245 | f = m_scene.m_maxNonphys / oldSize.X; | 2247 | f = m_scene.m_maxNonphys / oldSize.X; |
2246 | a = f / x; | 2248 | a = f / x; |
@@ -2248,7 +2250,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2248 | y *= a; | 2250 | y *= a; |
2249 | z *= a; | 2251 | z *= a; |
2250 | } | 2252 | } |
2251 | if(oldSize.Y*y > m_scene.m_maxNonphys) | 2253 | if (oldSize.Y*y > m_scene.m_maxNonphys) |
2252 | { | 2254 | { |
2253 | f = m_scene.m_maxNonphys / oldSize.Y; | 2255 | f = m_scene.m_maxNonphys / oldSize.Y; |
2254 | a = f / y; | 2256 | a = f / y; |
@@ -2256,7 +2258,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2256 | y *= a; | 2258 | y *= a; |
2257 | z *= a; | 2259 | z *= a; |
2258 | } | 2260 | } |
2259 | if(oldSize.Z*z > m_scene.m_maxNonphys) | 2261 | if (oldSize.Z*z > m_scene.m_maxNonphys) |
2260 | { | 2262 | { |
2261 | f = m_scene.m_maxNonphys / oldSize.Z; | 2263 | f = m_scene.m_maxNonphys / oldSize.Z; |
2262 | a = f / z; | 2264 | a = f / z; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 156310b..ac7e8a2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -2245,7 +2245,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2245 | public void SetAvatarOnSitTarget(LLUUID avatarID) | 2245 | public void SetAvatarOnSitTarget(LLUUID avatarID) |
2246 | { | 2246 | { |
2247 | m_sitTargetAvatar = avatarID; | 2247 | m_sitTargetAvatar = avatarID; |
2248 | if(ParentGroup != null) | 2248 | if (ParentGroup != null) |
2249 | ParentGroup.TriggerScriptChangedEvent(Changed.LINK); | 2249 | ParentGroup.TriggerScriptChangedEvent(Changed.LINK); |
2250 | } | 2250 | } |
2251 | 2251 | ||
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 36c9196..c9057f2 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment | |||
79 | 79 | ||
80 | typeInterface = pluginType.GetInterface("IEstateDataStore", true); | 80 | typeInterface = pluginType.GetInterface("IEstateDataStore", true); |
81 | 81 | ||
82 | if(typeInterface != null) | 82 | if (typeInterface != null) |
83 | { | 83 | { |
84 | IEstateDataStore estPlug = | 84 | IEstateDataStore estPlug = |
85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index 9f5e5a3..a1c1b88 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -212,11 +212,12 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
212 | { | 212 | { |
213 | m_scenes.Add(scene); | 213 | m_scenes.Add(scene); |
214 | } | 214 | } |
215 | //Only register it once, to prevend command being executed x*region times | 215 | //Only register it once, to prevent command being executed x*region times |
216 | if(m_scenes.Count ==1) { | 216 | if (m_scenes.Count == 1) |
217 | scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | 217 | { |
218 | } | 218 | scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; |
219 | } | 219 | } |
220 | } | ||
220 | 221 | ||
221 | public void PostInitialise() | 222 | public void PostInitialise() |
222 | { | 223 | { |
@@ -341,7 +342,6 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
341 | } | 342 | } |
342 | } | 343 | } |
343 | 344 | ||
344 | |||
345 | public void LoadAllScenes(int revision) | 345 | public void LoadAllScenes(int revision) |
346 | { | 346 | { |
347 | CheckoutSvn(new SvnRevision(revision)); | 347 | CheckoutSvn(new SvnRevision(revision)); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 3129c19..da1e511 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -425,8 +425,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
425 | m_host.AddScriptLPS(1); | 425 | m_host.AddScriptLPS(1); |
426 | double x,y,z,s; | 426 | double x,y,z,s; |
427 | int f=0; | 427 | int f=0; |
428 | // Important Note: q1=<x,y,z,s> is equal to q2=<-x,-y,-z,-s> | 428 | // Important Note: q1=<x,y,z,s> is equal to q2=<-x,-y,-z,-s> |
429 | // Computing quaternion x,y,z,s values | 429 | // Computing quaternion x,y,z,s values |
430 | x = ((fwd.x - left.y - up.z + 1) / 4); | 430 | x = ((fwd.x - left.y - up.z + 1) / 4); |
431 | x *= x; | 431 | x *= x; |
432 | x = Math.Sqrt(Math.Sqrt(x)); | 432 | x = Math.Sqrt(Math.Sqrt(x)); |
@@ -440,11 +440,11 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
440 | s *= s; | 440 | s *= s; |
441 | s = Math.Sqrt(Math.Sqrt(s)); | 441 | s = Math.Sqrt(Math.Sqrt(s)); |
442 | 442 | ||
443 | // Set f for signs detection | 443 | // Set f for signs detection |
444 | if (fwd.y+left.x >= 0){f+=1;} | 444 | if (fwd.y+left.x >= 0){f+=1;} |
445 | if (fwd.z+up.x >= 0){f+=2;} | 445 | if (fwd.z+up.x >= 0){f+=2;} |
446 | if (left.z-up.y >= 0){f+=4;} | 446 | if (left.z-up.y >= 0){f+=4;} |
447 | // Set correct quaternion signs based on f value | 447 | // Set correct quaternion signs based on f value |
448 | if (f == 0) { x = -x; } | 448 | if (f == 0) { x = -x; } |
449 | if (f == 1) { x = -x; y = -y; } | 449 | if (f == 1) { x = -x; y = -y; } |
450 | if (f == 2) { x = -x; z = -z; } | 450 | if (f == 2) { x = -x; z = -z; } |
@@ -459,7 +459,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
459 | if (llVecDist(llRot2Fwd(result), fwd) > 0.001 || llVecDist(llRot2Left(result), left) > 0.001) | 459 | if (llVecDist(llRot2Fwd(result), fwd) > 0.001 || llVecDist(llRot2Left(result), left) > 0.001) |
460 | result.s = -s; | 460 | result.s = -s; |
461 | 461 | ||
462 | return result; | 462 | return result; |
463 | } | 463 | } |
464 | 464 | ||
465 | public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) | 465 | public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) |
@@ -950,19 +950,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
950 | if (value == 1) | 950 | if (value == 1) |
951 | { | 951 | { |
952 | SceneObjectGroup group = m_host.ParentGroup; | 952 | SceneObjectGroup group = m_host.ParentGroup; |
953 | if(group == null) | 953 | if (group == null) |
954 | return; | 954 | return; |
955 | bool allow = true; | 955 | bool allow = true; |
956 | foreach(SceneObjectPart part in group.Children.Values) | 956 | foreach (SceneObjectPart part in group.Children.Values) |
957 | { | 957 | { |
958 | if(part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) | 958 | if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) |
959 | { | 959 | { |
960 | allow = false; | 960 | allow = false; |
961 | break; | 961 | break; |
962 | } | 962 | } |
963 | } | 963 | } |
964 | 964 | ||
965 | if(!allow) | 965 | if (!allow) |
966 | return; | 966 | return; |
967 | m_host.ScriptSetPhysicsStatus(true); | 967 | m_host.ScriptSetPhysicsStatus(true); |
968 | } | 968 | } |
@@ -1083,23 +1083,23 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1083 | { | 1083 | { |
1084 | // TODO: this needs to trigger a persistance save as well | 1084 | // TODO: this needs to trigger a persistance save as well |
1085 | 1085 | ||
1086 | if(part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null) | 1086 | if (part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null) |
1087 | return; | 1087 | return; |
1088 | 1088 | ||
1089 | if(part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) | 1089 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) |
1090 | { | 1090 | { |
1091 | if(scale.x > World.m_maxPhys) | 1091 | if (scale.x > World.m_maxPhys) |
1092 | scale.x = World.m_maxPhys; | 1092 | scale.x = World.m_maxPhys; |
1093 | if(scale.y > World.m_maxPhys) | 1093 | if (scale.y > World.m_maxPhys) |
1094 | scale.y = World.m_maxPhys; | 1094 | scale.y = World.m_maxPhys; |
1095 | if(scale.z > World.m_maxPhys) | 1095 | if (scale.z > World.m_maxPhys) |
1096 | scale.z = World.m_maxPhys; | 1096 | scale.z = World.m_maxPhys; |
1097 | } | 1097 | } |
1098 | if(scale.x > World.m_maxNonphys) | 1098 | if (scale.x > World.m_maxNonphys) |
1099 | scale.x = World.m_maxNonphys; | 1099 | scale.x = World.m_maxNonphys; |
1100 | if(scale.y > World.m_maxNonphys) | 1100 | if (scale.y > World.m_maxNonphys) |
1101 | scale.y = World.m_maxNonphys; | 1101 | scale.y = World.m_maxNonphys; |
1102 | if(scale.z > World.m_maxNonphys) | 1102 | if (scale.z > World.m_maxNonphys) |
1103 | scale.z = World.m_maxNonphys; | 1103 | scale.z = World.m_maxNonphys; |
1104 | LLVector3 tmp = part.Scale; | 1104 | LLVector3 tmp = part.Scale; |
1105 | tmp.X = (float)scale.x; | 1105 | tmp.X = (float)scale.x; |
@@ -6776,7 +6776,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6776 | 6776 | ||
6777 | public LSL_Types.Vector3 llGetCameraPos() | 6777 | public LSL_Types.Vector3 llGetCameraPos() |
6778 | { | 6778 | { |
6779 | m_host.AddScriptLPS(1); | 6779 | m_host.AddScriptLPS(1); |
6780 | LLUUID invItemID=InventorySelf(); | 6780 | LLUUID invItemID=InventorySelf(); |
6781 | if (invItemID == LLUUID.Zero) | 6781 | if (invItemID == LLUUID.Zero) |
6782 | return new LSL_Types.Vector3(); | 6782 | return new LSL_Types.Vector3(); |
@@ -6784,16 +6784,16 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6784 | return new LSL_Types.Vector3(); | 6784 | return new LSL_Types.Vector3(); |
6785 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) | 6785 | if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) |
6786 | { | 6786 | { |
6787 | ShoutError("No permissions to track the camera"); | 6787 | ShoutError("No permissions to track the camera"); |
6788 | return new LSL_Types.Vector3(); | 6788 | return new LSL_Types.Vector3(); |
6789 | } | 6789 | } |
6790 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | 6790 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); |
6791 | if(presence != null) | 6791 | if (presence != null) |
6792 | { | 6792 | { |
6793 | LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); | 6793 | LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); |
6794 | return pos; | 6794 | return pos; |
6795 | } | 6795 | } |
6796 | return new LSL_Types.Vector3(); | 6796 | return new LSL_Types.Vector3(); |
6797 | } | 6797 | } |
6798 | 6798 | ||
6799 | public LSL_Types.Quaternion llGetCameraRot() | 6799 | public LSL_Types.Quaternion llGetCameraRot() |
@@ -6968,7 +6968,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6968 | { | 6968 | { |
6969 | m_host.AddScriptLPS(1); | 6969 | m_host.AddScriptLPS(1); |
6970 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); | 6970 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); |
6971 | if(estate == null) | 6971 | if (estate == null) |
6972 | return 67108864; | 6972 | return 67108864; |
6973 | return estate.GetRegionFlags(); | 6973 | return estate.GetRegionFlags(); |
6974 | } | 6974 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs index 537c114..ac56875 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs | |||
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog | |||
2108 | string results = ""; | 2108 | string results = ""; |
2109 | for (Match m = Regex.Match(inData,inPattern); m.Success; m=m.NextMatch()) | 2109 | for (Match m = Regex.Match(inData,inPattern); m.Success; m=m.NextMatch()) |
2110 | { | 2110 | { |
2111 | //Console.WriteLine( m ); | 2111 | //Console.WriteLine( m ); |
2112 | results += presep+ m + postsep; | 2112 | results += presep+ m + postsep; |
2113 | } | 2113 | } |
2114 | return results; | 2114 | return results; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ac4d43a..a5c5453 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -790,19 +790,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
790 | if (value == 1) | 790 | if (value == 1) |
791 | { | 791 | { |
792 | SceneObjectGroup group = m_host.ParentGroup; | 792 | SceneObjectGroup group = m_host.ParentGroup; |
793 | if(group == null) | 793 | if (group == null) |
794 | return; | 794 | return; |
795 | bool allow = true; | 795 | bool allow = true; |
796 | foreach(SceneObjectPart part in group.Children.Values) | 796 | foreach (SceneObjectPart part in group.Children.Values) |
797 | { | 797 | { |
798 | if(part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) | 798 | if (part.Scale.X > World.m_maxPhys || part.Scale.Y > World.m_maxPhys || part.Scale.Z > World.m_maxPhys) |
799 | { | 799 | { |
800 | allow = false; | 800 | allow = false; |
801 | break; | 801 | break; |
802 | } | 802 | } |
803 | } | 803 | } |
804 | 804 | ||
805 | if(!allow) | 805 | if (!allow) |
806 | return; | 806 | return; |
807 | m_host.ScriptSetPhysicsStatus(true); | 807 | m_host.ScriptSetPhysicsStatus(true); |
808 | } | 808 | } |
@@ -937,23 +937,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
937 | { | 937 | { |
938 | // TODO: this needs to trigger a persistance save as well | 938 | // TODO: this needs to trigger a persistance save as well |
939 | 939 | ||
940 | if(part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null) | 940 | if (part == null || part.ParentGroup == null || part.ParentGroup.RootPart == null) |
941 | return; | 941 | return; |
942 | 942 | ||
943 | if(part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) | 943 | if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) |
944 | { | 944 | { |
945 | if(scale.x > World.m_maxPhys) | 945 | if (scale.x > World.m_maxPhys) |
946 | scale.x = World.m_maxPhys; | 946 | scale.x = World.m_maxPhys; |
947 | if(scale.y > World.m_maxPhys) | 947 | if (scale.y > World.m_maxPhys) |
948 | scale.y = World.m_maxPhys; | 948 | scale.y = World.m_maxPhys; |
949 | if(scale.z > World.m_maxPhys) | 949 | if (scale.z > World.m_maxPhys) |
950 | scale.z = World.m_maxPhys; | 950 | scale.z = World.m_maxPhys; |
951 | } | 951 | } |
952 | if(scale.x > World.m_maxNonphys) | 952 | if (scale.x > World.m_maxNonphys) |
953 | scale.x = World.m_maxNonphys; | 953 | scale.x = World.m_maxNonphys; |
954 | if(scale.y > World.m_maxNonphys) | 954 | if (scale.y > World.m_maxNonphys) |
955 | scale.y = World.m_maxNonphys; | 955 | scale.y = World.m_maxNonphys; |
956 | if(scale.z > World.m_maxNonphys) | 956 | if (scale.z > World.m_maxNonphys) |
957 | scale.z = World.m_maxNonphys; | 957 | scale.z = World.m_maxNonphys; |
958 | LLVector3 tmp = part.Scale; | 958 | LLVector3 tmp = part.Scale; |
959 | tmp.X = (float)scale.x; | 959 | tmp.X = (float)scale.x; |
@@ -6748,7 +6748,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6748 | { | 6748 | { |
6749 | m_host.AddScriptLPS(1); | 6749 | m_host.AddScriptLPS(1); |
6750 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); | 6750 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); |
6751 | if(estate == null) | 6751 | if (estate == null) |
6752 | return 67108864; | 6752 | return 67108864; |
6753 | return (int)estate.GetRegionFlags(); | 6753 | return (int)estate.GetRegionFlags(); |
6754 | } | 6754 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs index 17f2f1c..76e307a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | |||
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
2108 | string results = ""; | 2108 | string results = ""; |
2109 | for (Match m = Regex.Match(inData,inPattern); m.Success; m=m.NextMatch()) | 2109 | for (Match m = Regex.Match(inData,inPattern); m.Success; m=m.NextMatch()) |
2110 | { | 2110 | { |
2111 | //Console.WriteLine( m ); | 2111 | //Console.WriteLine( m ); |
2112 | results += presep+ m + postsep; | 2112 | results += presep+ m + postsep; |
2113 | } | 2113 | } |
2114 | return results; | 2114 | return results; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index f7b6d08..e8cfdf7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
327 | { | 327 | { |
328 | // Its LSL, convert it to C# | 328 | // Its LSL, convert it to C# |
329 | //compileScript = LSL_Converter.Convert(Script); | 329 | //compileScript = LSL_Converter.Convert(Script); |
330 | if(m_UseCompiler) | 330 | if (m_UseCompiler) |
331 | LSL_Converter = (ICodeConverter)new CSCodeGenerator(); | 331 | LSL_Converter = (ICodeConverter)new CSCodeGenerator(); |
332 | else | 332 | else |
333 | LSL_Converter = (ICodeConverter)new LSL2CSConverter(); | 333 | LSL_Converter = (ICodeConverter)new LSL2CSConverter(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs index a57530c..28e42da 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs | |||
@@ -30,8 +30,8 @@ using System; | |||
30 | 30 | ||
31 | namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | 31 | namespace OpenSim.Region.ScriptEngine.Shared.CodeTools |
32 | { | 32 | { |
33 | public interface ICodeConverter | 33 | public interface ICodeConverter |
34 | { | 34 | { |
35 | string Convert(string script); | 35 | string Convert(string script); |
36 | } | 36 | } |
37 | } | 37 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 9f67dc1..673189a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1191,8 +1191,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1191 | if (result == null) | 1191 | if (result == null) |
1192 | return true; | 1192 | return true; |
1193 | 1193 | ||
1194 | if(!m_InSelfDelete) | 1194 | if (!m_InSelfDelete) |
1195 | result.Abort(); | 1195 | result.Abort(); |
1196 | 1196 | ||
1197 | lock (m_EventQueue) | 1197 | lock (m_EventQueue) |
1198 | { | 1198 | { |
@@ -1342,10 +1342,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1342 | e.ToString()); | 1342 | e.ToString()); |
1343 | } | 1343 | } |
1344 | } | 1344 | } |
1345 | else if((e is TargetInvocationException) && (e.InnerException is SelfDeleteException)) | 1345 | else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException)) |
1346 | { | 1346 | { |
1347 | m_InSelfDelete = true; | 1347 | m_InSelfDelete = true; |
1348 | if(part != null && part.ParentGroup != null) | 1348 | if (part != null && part.ParentGroup != null) |
1349 | m_Engine.World.DeleteSceneObject(part.ParentGroup); | 1349 | m_Engine.World.DeleteSceneObject(part.ParentGroup); |
1350 | } | 1350 | } |
1351 | } | 1351 | } |