aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authoralondria2008-03-23 06:08:52 +0000
committeralondria2008-03-23 06:08:52 +0000
commit5deca3f0c5bfac77e7f4c52b4d7414f01e70b58d (patch)
tree181ea47780b40b1397d19a80a2fbfd2e1e238990 /OpenSim
parentFix llParseString2List bug when separator is longer than 1 character. (diff)
downloadopensim-SC-5deca3f0c5bfac77e7f4c52b4d7414f01e70b58d.zip
opensim-SC-5deca3f0c5bfac77e7f4c52b4d7414f01e70b58d.tar.gz
opensim-SC-5deca3f0c5bfac77e7f4c52b4d7414f01e70b58d.tar.bz2
opensim-SC-5deca3f0c5bfac77e7f4c52b4d7414f01e70b58d.tar.xz
Implements (I hope): llRemoveFromLandBanList, llRemoveFromLandPassList, llAddToLandBanList, llAddToLandPassList, llResetLandPassList, llResetLandBanList
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs89
1 files changed, 83 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 6438312..9a1b652 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3102,7 +3102,19 @@ namespace OpenSim.Region.ScriptEngine.Common
3102 public void llAddToLandPassList(string avatar, double hours) 3102 public void llAddToLandPassList(string avatar, double hours)
3103 { 3103 {
3104 m_host.AddScriptLPS(1); 3104 m_host.AddScriptLPS(1);
3105 NotImplemented("llAddToLandPassList"); 3105 LLUUID key;
3106 LandData land = World.LandChannel.getLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
3107 if (land.ownerID == m_host.OwnerID)
3108 {
3109 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
3110 if (LLUUID.TryParse(avatar, out key))
3111 {
3112 entry.AgentID = key;
3113 entry.Flags = ParcelManager.AccessList.Access;
3114 entry.Time = DateTime.Now.AddHours(hours);
3115 land.parcelAccessList.Add(entry);
3116 }
3117 }
3106 } 3118 }
3107 3119
3108 public void llSetTouchText(string text) 3120 public void llSetTouchText(string text)
@@ -4240,19 +4252,64 @@ namespace OpenSim.Region.ScriptEngine.Common
4240 public void llAddToLandBanList(string avatar, double hours) 4252 public void llAddToLandBanList(string avatar, double hours)
4241 { 4253 {
4242 m_host.AddScriptLPS(1); 4254 m_host.AddScriptLPS(1);
4243 NotImplemented("llAddToLandBanList"); 4255 LLUUID key;
4256 LandData land = World.LandChannel.getLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4257 if (land.ownerID == m_host.OwnerID)
4258 {
4259 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
4260 if (LLUUID.TryParse(avatar, out key))
4261 {
4262 entry.AgentID = key;
4263 entry.Flags = ParcelManager.AccessList.Ban;
4264 entry.Time = DateTime.Now.AddHours(hours);
4265 land.parcelAccessList.Add(entry);
4266 }
4267 }
4268 //NotImplemented("llAddToLandBanList");
4244 } 4269 }
4245 4270
4246 public void llRemoveFromLandPassList(string avatar) 4271 public void llRemoveFromLandPassList(string avatar)
4247 { 4272 {
4248 m_host.AddScriptLPS(1); 4273 m_host.AddScriptLPS(1);
4249 NotImplemented("llRemoveFromLandPassList"); 4274 LLUUID key;
4275 LandData land = World.LandChannel.getLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4276 if (land.ownerID == m_host.OwnerID)
4277 {
4278 if (LLUUID.TryParse(avatar, out key))
4279 {
4280 foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
4281 {
4282 if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access)
4283 {
4284 land.parcelAccessList.Remove(entry);
4285 break;
4286 }
4287 }
4288 }
4289 }
4290 //NotImplemented("llRemoveFromLandPassList");
4250 } 4291 }
4251 4292
4252 public void llRemoveFromLandBanList(string avatar) 4293 public void llRemoveFromLandBanList(string avatar)
4253 { 4294 {
4254 m_host.AddScriptLPS(1); 4295 m_host.AddScriptLPS(1);
4255 NotImplemented("llRemoveFromLandBanList"); 4296 LLUUID key;
4297 LandData land = World.LandChannel.getLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4298 if (land.ownerID == m_host.OwnerID)
4299 {
4300 if (LLUUID.TryParse(avatar, out key))
4301 {
4302 foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
4303 {
4304 if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban)
4305 {
4306 land.parcelAccessList.Remove(entry);
4307 break;
4308 }
4309 }
4310 }
4311 }
4312 //NotImplemented("llRemoveFromLandPassList");
4256 } 4313 }
4257 4314
4258 public void llSetCameraParams(LSL_Types.list rules) 4315 public void llSetCameraParams(LSL_Types.list rules)
@@ -4363,13 +4420,33 @@ namespace OpenSim.Region.ScriptEngine.Common
4363 public void llResetLandBanList() 4420 public void llResetLandBanList()
4364 { 4421 {
4365 m_host.AddScriptLPS(1); 4422 m_host.AddScriptLPS(1);
4366 NotImplemented("llResetLandBanList"); 4423 LandData land = World.LandChannel.getLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4424 if (land.ownerID == m_host.OwnerID)
4425 {
4426 foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
4427 {
4428 if (entry.Flags == ParcelManager.AccessList.Ban)
4429 {
4430 land.parcelAccessList.Remove(entry);
4431 }
4432 }
4433 }
4367 } 4434 }
4368 4435
4369 public void llResetLandPassList() 4436 public void llResetLandPassList()
4370 { 4437 {
4371 m_host.AddScriptLPS(1); 4438 m_host.AddScriptLPS(1);
4372 NotImplemented("llResetLandPassList"); 4439 LandData land = World.LandChannel.getLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4440 if (land.ownerID == m_host.OwnerID)
4441 {
4442 foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList)
4443 {
4444 if (entry.Flags == ParcelManager.AccessList.Access)
4445 {
4446 land.parcelAccessList.Remove(entry);
4447 }
4448 }
4449 }
4373 } 4450 }
4374 4451
4375 public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) 4452 public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide)