diff options
author | mingchen | 2008-05-07 17:33:57 +0000 |
---|---|---|
committer | mingchen | 2008-05-07 17:33:57 +0000 |
commit | 6551f17966975081ac9b9f4c3b19d33e9d2c69a5 (patch) | |
tree | 24fee3acb4381334e3e4cdc46712e20d63803839 /OpenSim/Region/Environment/Modules | |
parent | From: Kurt Taylor <krtaylor@us.ibm.com> (diff) | |
download | opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.zip opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.tar.gz opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.tar.bz2 opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.tar.xz |
*Added SceneExternalChecks.cs that is used to manage checking the results of multiple functions that register with the class and return the result (usually true/false) based on those results. This is useful for module wanting to put their opinion in decisions such as 'can the user rez this object?'
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 75e9e57..5203b94 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -140,12 +140,21 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
140 | return false; | 140 | return false; |
141 | } | 141 | } |
142 | 142 | ||
143 | public virtual bool CanRezObject(LLUUID user, LLVector3 position) | 143 | public virtual bool CanRezObject(LLUUID user, LLVector3 position, int objectCount) |
144 | { | 144 | { |
145 | bool permission = false; | 145 | bool permission = false; |
146 | 146 | ||
147 | |||
148 | |||
147 | string reason = "Insufficient permission"; | 149 | string reason = "Insufficient permission"; |
148 | 150 | ||
151 | //Perform ExternalChecks first! | ||
152 | bool results = m_scene.ExternalChecks.ExternalChecksCanRezObject(objectCount, user, position); | ||
153 | if (results == false) | ||
154 | { | ||
155 | return false; | ||
156 | } | ||
157 | |||
149 | ILandObject land = m_scene.LandChannel.GetLandObject(position.X, position.Y); | 158 | ILandObject land = m_scene.LandChannel.GetLandObject(position.X, position.Y); |
150 | if (land == null) return false; | 159 | if (land == null) return false; |
151 | 160 | ||