aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-10 09:36:55 +0000
committerTeravus Ovares2008-04-10 09:36:55 +0000
commit06967e230f50fbeee24176f3df8cda8a067544e4 (patch)
treed824f1a8834700d12a77159159094a6524a856bb /OpenSim/Region/Environment/Scenes
parent* Adds twist support for Cubes, Cylinders, and Prisms in the Meshmerizer (diff)
downloadopensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.zip
opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.tar.gz
opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.tar.bz2
opensim-SC_OLD-06967e230f50fbeee24176f3df8cda8a067544e4.tar.xz
* Updates BetaGridLikeMoneyModule
* Several people have asked for a way to limit uploads, so I've decided to show people how to do this in the BetaGridLikeMoneyModule. * Configure it in OpenSim.ini using the [Economy] header. See the bottom of the OpenSim.ini.example for more information. * This also fleshes out the Economy API a bit more.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs9
4 files changed, 47 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index bc8fb59..97d09aa 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -73,6 +73,17 @@ namespace OpenSim.Region.Environment.Scenes
73 { 73 {
74 userInfo.AddItem(remoteClient.AgentId, item); 74 userInfo.AddItem(remoteClient.AgentId, item);
75 remoteClient.SendInventoryItemCreateUpdate(item); 75 remoteClient.SendInventoryItemCreateUpdate(item);
76
77 int userlevel = 0;
78 if (PermissionsMngr.IsEstateManager(remoteClient.AgentId))
79 {
80 userlevel = 1;
81 }
82 if (m_regInfo.MasterAvatarAssignedUUID == remoteClient.AgentId)
83 {
84 userlevel = 2;
85 }
86 EventManager.TriggerOnNewInventoryItemUploadComplete(remoteClient.AgentId, item.AssetID, item.Name, userlevel);
76 } 87 }
77 } 88 }
78 89
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 8f4c332..4a57c5d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -219,6 +219,8 @@ namespace OpenSim.Region.Environment.Scenes
219 set { m_innerScene.RestorePresences = value; } 219 set { m_innerScene.RestorePresences = value; }
220 } 220 }
221 221
222 public int objectCapacity = 45000;
223
222 #endregion 224 #endregion
223 225
224 #region Constructors 226 #region Constructors
@@ -299,6 +301,9 @@ namespace OpenSim.Region.Environment.Scenes
299 301
300 m_statsReporter = new SimStatsReporter(regInfo); 302 m_statsReporter = new SimStatsReporter(regInfo);
301 m_statsReporter.OnSendStatsResult += SendSimStatsPackets; 303 m_statsReporter.OnSendStatsResult += SendSimStatsPackets;
304
305 m_statsReporter.SetObjectCapacity(objectCapacity);
306
302 string OSString = ""; 307 string OSString = "";
303 308
304 if (System.Environment.OSVersion.Platform != PlatformID.Unix) 309 if (System.Environment.OSVersion.Platform != PlatformID.Unix)
@@ -2016,6 +2021,15 @@ namespace OpenSim.Region.Environment.Scenes
2016 } 2021 }
2017 } 2022 }
2018 2023
2024 public void SetObjectCapacity(int objects)
2025 {
2026 if (m_statsReporter != null)
2027 {
2028 m_statsReporter.SetObjectCapacity(objects);
2029 }
2030 objectCapacity = objects;
2031 }
2032
2019 #endregion 2033 #endregion
2020 2034
2021 #region Other Methods 2035 #region Other Methods
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index c916009..02c9f3f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -137,6 +137,10 @@ namespace OpenSim.Region.Environment.Scenes
137 137
138 public event OnNewPresenceDelegate OnMakeChildAgent; 138 public event OnNewPresenceDelegate OnMakeChildAgent;
139 139
140 public delegate void NewInventoryItemUploadComplete(LLUUID avatarID, LLUUID assetID, string name, int userlevel);
141
142 public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
143
140 /// <summary> 144 /// <summary>
141 /// RegisterCapsEvent is called by Scene after the Caps object 145 /// RegisterCapsEvent is called by Scene after the Caps object
142 /// has been instantiated and before it is return to the 146 /// has been instantiated and before it is return to the
@@ -207,6 +211,7 @@ namespace OpenSim.Region.Environment.Scenes
207 private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick; 211 private OnTerrainTickDelegate handlerTerrainTick = null; // OnTerainTick;
208 private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps; 212 private RegisterCapsEvent handlerRegisterCaps = null; // OnRegisterCaps;
209 private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps; 213 private DeregisterCapsEvent handlerDeregisterCaps = null; // OnDeregisterCaps;
214 private NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = null;
210 215
211 public void TriggerOnScriptChangedEvent(uint localID, uint change) 216 public void TriggerOnScriptChangedEvent(uint localID, uint change)
212 { 217 {
@@ -462,5 +467,14 @@ namespace OpenSim.Region.Environment.Scenes
462 handlerDeregisterCaps(agentID, caps); 467 handlerDeregisterCaps(agentID, caps);
463 } 468 }
464 } 469 }
470
471 public void TriggerOnNewInventoryItemUploadComplete(LLUUID agentID, LLUUID AssetID, String AssetName, int userlevel)
472 {
473 handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
474 if (handlerNewInventoryItemUpdateComplete != null)
475 {
476 handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel);
477 }
478 }
465 } 479 }
466} 480}
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index ef741d4..d72bee0 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -100,6 +100,8 @@ namespace OpenSim.Region.Environment.Scenes
100 private int m_pendingUploads = 0; 100 private int m_pendingUploads = 0;
101 private int m_activeScripts = 0; 101 private int m_activeScripts = 0;
102 private int m_scriptLinesPerSecond = 0; 102 private int m_scriptLinesPerSecond = 0;
103
104 private int objectCapacity = 45000;
103 105
104 106
105 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[21]; 107 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[21];
@@ -152,7 +154,7 @@ namespace OpenSim.Region.Environment.Scenes
152 { 154 {
153 statpack.Region.RegionFlags = (uint) 0; 155 statpack.Region.RegionFlags = (uint) 0;
154 } 156 }
155 statpack.Region.ObjectCapacity = (uint) 45000; 157 statpack.Region.ObjectCapacity = (uint) objectCapacity;
156 158
157 #region various statistic googly moogly 159 #region various statistic googly moogly
158 160
@@ -389,6 +391,11 @@ namespace OpenSim.Region.Environment.Scenes
389 m_activeScripts = count; 391 m_activeScripts = count;
390 } 392 }
391 393
394 public void SetObjectCapacity(int objects)
395 {
396 objectCapacity = objects;
397 }
398
392 #endregion 399 #endregion
393 } 400 }
394} 401}