aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/IClientAPI.cs9
-rw-r--r--OpenSim/Framework/RegionInfo.cs8
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs28
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs52
-rw-r--r--OpenSim/Region/Environment/Scenes/AvatarAnimations.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs7
7 files changed, 101 insertions, 14 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 7d9fd9a..fde74d6 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -320,6 +320,10 @@ namespace OpenSim.Framework
320 320
321 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); 321 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
322 322
323 public delegate void RegionInfoRequest(IClientAPI remote_client, LLUUID sessionID);
324
325 public delegate void EstateCovenantRequest(IClientAPI remote_client, LLUUID sessionID);
326
323 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 327 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
324 328
325 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape); 329 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape);
@@ -466,6 +470,10 @@ namespace OpenSim.Framework
466 event ParcelSelectObjects OnParcelSelectObjects; 470 event ParcelSelectObjects OnParcelSelectObjects;
467 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 471 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
468 event EstateOwnerMessageRequest OnEstateOwnerMessage; 472 event EstateOwnerMessageRequest OnEstateOwnerMessage;
473 event RegionInfoRequest OnRegionInfoRequest;
474 event EstateCovenantRequest OnEstateCovenantRequest;
475
476
469 477
470 LLVector3 StartPos { get; set; } 478 LLVector3 StartPos { get; set; }
471 479
@@ -551,6 +559,7 @@ namespace OpenSim.Framework
551 559
552 void SendNameReply(LLUUID profileId, string firstname, string lastname); 560 void SendNameReply(LLUUID profileId, string firstname, string lastname);
553 void SendAlertMessage(string message); 561 void SendAlertMessage(string message);
562
554 void SendAgentAlertMessage(string message, bool modal); 563 void SendAgentAlertMessage(string message, bool modal);
555 void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); 564 void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url);
556 bool AddMoney(int debit); 565 bool AddMoney(int debit);
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index fba78a9..6a9de2c 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -199,6 +199,7 @@ namespace OpenSim.Framework
199 public bool commFailTF = false; 199 public bool commFailTF = false;
200 200
201 public LLUUID MasterAvatarAssignedUUID = LLUUID.Zero; 201 public LLUUID MasterAvatarAssignedUUID = LLUUID.Zero;
202 public LLUUID CovenantID = LLUUID.Zero;
202 public string MasterAvatarFirstName = ""; 203 public string MasterAvatarFirstName = "";
203 public string MasterAvatarLastName = ""; 204 public string MasterAvatarLastName = "";
204 public string MasterAvatarSandboxPassword = ""; 205 public string MasterAvatarSandboxPassword = "";
@@ -316,7 +317,8 @@ namespace OpenSim.Framework
316 configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false); 317 configMember.addConfigurationOption("internal_ip_address", ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, "Internal IP Address for incoming UDP client connections", "0.0.0.0", false);
317 configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); 318 configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Internal IP Port for incoming UDP client connections", NetworkServersInfo.DefaultHttpListenerPort.ToString(), false);
318 configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false); 319 configMember.addConfigurationOption("external_host_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "External Host Name", "127.0.0.1", false);
319 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToString(), true); 320 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Master Avatar UUID", LLUUID.Zero.ToStringHyphenated(), true);
321 configMember.addConfigurationOption("estate_covanant_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant", LLUUID.Zero.ToStringHyphenated(), true);
320 configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); 322 configMember.addConfigurationOption("master_avatar_first", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "First Name of Master Avatar", "Test", false,(ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
321 configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); 323 configMember.addConfigurationOption("master_avatar_last", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Name of Master Avatar", "User", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
322 configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked); 324 configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "(Sandbox Mode Only)Password for Master Avatar account", "test", false, (ConfigurationOption.ConfigurationOptionShouldBeAsked)shouldMasterAvatarDetailsBeAsked);
@@ -370,6 +372,10 @@ namespace OpenSim.Framework
370 case "master_avatar_uuid": 372 case "master_avatar_uuid":
371 this.MasterAvatarAssignedUUID = (LLUUID)configuration_result; 373 this.MasterAvatarAssignedUUID = (LLUUID)configuration_result;
372 break; 374 break;
375 case "estate_covanant_uuid":
376 this.CovenantID = (LLUUID)configuration_result;
377 break;
378
373 case "master_avatar_first": 379 case "master_avatar_first":
374 this.MasterAvatarFirstName = (string)configuration_result; 380 this.MasterAvatarFirstName = (string)configuration_result;
375 break; 381 break;
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index df52745..3c35270 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -529,6 +529,9 @@ namespace OpenSim.Region.ClientStack
529 public event ParcelSelectObjects OnParcelSelectObjects; 529 public event ParcelSelectObjects OnParcelSelectObjects;
530 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 530 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
531 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 531 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
532 public event RegionInfoRequest OnRegionInfoRequest;
533 public event EstateCovenantRequest OnEstateCovenantRequest;
534
532 535
533 #region Scene/Avatar to Client 536 #region Scene/Avatar to Client
534 537
@@ -3216,7 +3219,21 @@ namespace OpenSim.Region.ClientStack
3216 OnEstateOwnerMessage(messagePacket, this); 3219 OnEstateOwnerMessage(messagePacket, this);
3217 } 3220 }
3218 break; 3221 break;
3219 3222 case PacketType.RequestRegionInfo:
3223 RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData;
3224 if (OnRegionInfoRequest != null)
3225 {
3226 OnRegionInfoRequest(this, mPacket.SessionID);
3227 }
3228 break;
3229 case PacketType.EstateCovenantRequest:
3230 // TODO: handle this packet
3231 EstateCovenantRequestPacket.AgentDataBlock epack = ((EstateCovenantRequestPacket)Pack).AgentData;
3232 if (OnEstateCovenantRequest != null)
3233 {
3234 OnEstateCovenantRequest(this, epack.SessionID);
3235 }
3236 break;
3220 case PacketType.AgentThrottle: 3237 case PacketType.AgentThrottle:
3221 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; 3238 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
3222 m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles); 3239 m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles);
@@ -3278,10 +3295,7 @@ namespace OpenSim.Region.ClientStack
3278 // TODO: handle this packet 3295 // TODO: handle this packet
3279 MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet"); 3296 MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet");
3280 break; 3297 break;
3281 case PacketType.EstateCovenantRequest: 3298
3282 // TODO: handle this packet
3283 MainLog.Instance.Warn("CLIENT", "unhandled EstateCovenantRequest packet");
3284 break;
3285 case PacketType.CreateGroupRequest: 3299 case PacketType.CreateGroupRequest:
3286 // TODO: handle this packet 3300 // TODO: handle this packet
3287 MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet"); 3301 MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet");
@@ -3343,10 +3357,6 @@ namespace OpenSim.Region.ClientStack
3343 // TODO: handle this packet 3357 // TODO: handle this packet
3344 MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet"); 3358 MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet");
3345 break; 3359 break;
3346 case PacketType.RequestRegionInfo:
3347 // TODO: handle this packet
3348 MainLog.Instance.Warn("CLIENT", "unhandled RequestRegionInfo packet");
3349 break;
3350 case PacketType.InventoryDescendents: 3360 case PacketType.InventoryDescendents:
3351 // TODO: handle this packet 3361 // TODO: handle this packet
3352 MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet"); 3362 MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet");
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index e1bb4d8..081a8cd 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -177,6 +177,12 @@ namespace OpenSim.Region.Environment
177 estateRestartSim(packet); 177 estateRestartSim(packet);
178 } 178 }
179 break; 179 break;
180 case "estatechangecovenantid":
181 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
182 {
183 EstateChangeCovenant(packet);
184 }
185 break;
180 default: 186 default:
181 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); 187 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
182 break; 188 break;
@@ -340,8 +346,54 @@ namespace OpenSim.Region.Environment
340 346
341 } 347 }
342 } 348 }
349 private void EstateChangeCovenant(EstateOwnerMessagePacket packet)
350 {
351 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
352 {
353 LLUUID newCovenantID = new LLUUID(Helpers.FieldToUTF8String(block.Parameter));
354 m_regInfo.CovenantID = newCovenantID;
343 355
356 }
357
358 }
359 public void HandleRegionInfoRequest(IClientAPI client, LLUUID sessionID)
360 {
361 RegionInfoPacket rinfopack = new RegionInfoPacket();
362 RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock();
363
364 rinfoblk.BillableFactor = 0;
365 rinfoblk.EstateID = 02;
366 rinfoblk.MaxAgents = 100;
367 rinfoblk.ObjectBonusFactor = 1.0f;
368 rinfoblk.ParentEstateID = 0;
369 rinfoblk.PricePerMeter = 0;
370 rinfoblk.RedirectGridX = 0;
371 rinfoblk.RedirectGridY = 0;
372 rinfoblk.RegionFlags = (uint)m_regInfo.EstateSettings.regionFlags;
373 rinfoblk.SimAccess = (byte)m_regInfo.EstateSettings.simAccess;
374 rinfoblk.SunHour = m_regInfo.EstateSettings.sunHour;
375 rinfoblk.TerrainLowerLimit = 20;
376 rinfoblk.TerrainRaiseLimit = 20;
377 rinfoblk.UseEstateSun = true;
378 rinfoblk.WaterHeight = m_regInfo.EstateSettings.waterHeight;
379 rinfoblk.SimName = Helpers.StringToField(m_regInfo.RegionName);
380
381 rinfopack.RegionInfo = rinfoblk;
382
383 client.OutPacket(rinfopack, ThrottleOutPacketType.Task);
344 384
385 }
386 public void HandleEstateCovenantRequest(IClientAPI client, LLUUID sessionID)
387 {
388 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
389 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
390 edata.CovenantID = m_regInfo.CovenantID;
391 edata.CovenantTimestamp = 0;
392 edata.EstateOwnerID = m_regInfo.MasterAvatarAssignedUUID;
393 edata.EstateName = Helpers.StringToField(m_regInfo.MasterAvatarFirstName + " " + m_regInfo.MasterAvatarLastName);
394 einfopack.Data = edata;
395 client.OutPacket(einfopack, ThrottleOutPacketType.Task);
396 }
345 #endregion 397 #endregion
346 398
347 #region Outgoing Packets 399 #region Outgoing Packets
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
index d508c9e..82ecda8 100644
--- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
+++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
@@ -59,10 +59,13 @@ namespace OpenSim.Region.Environment.Scenes
59 } 59 }
60 60
61 // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 61 // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
62 62
63 foreach (KeyValuePair<string, LLUUID> kp in ScenePresence.Animations.AnimsLLUUID) 63 lock (ScenePresence.Animations.AnimsLLUUID)
64 { 64 {
65 AnimsNames.Add(kp.Value, kp.Key); 65 foreach (KeyValuePair<string, LLUUID> kp in ScenePresence.Animations.AnimsLLUUID)
66 {
67 AnimsNames.Add(kp.Value, kp.Key);
68 }
66 } 69 }
67 } 70 }
68 } 71 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 9ca23d5..eec07fc 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1122,6 +1122,8 @@ namespace OpenSim.Region.Environment.Scenes
1122 client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest); 1122 client.OnParcelAccessListUpdateRequest += new ParcelAccessListUpdateRequest(m_LandManager.handleParcelAccessUpdateRequest);
1123 1123
1124 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); 1124 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
1125 client.OnRegionInfoRequest += m_estateManager.HandleRegionInfoRequest;
1126 client.OnEstateCovenantRequest += m_estateManager.HandleEstateCovenantRequest;
1125 client.OnRequestGodlikePowers += handleRequestGodlikePowers; 1127 client.OnRequestGodlikePowers += handleRequestGodlikePowers;
1126 client.OnGodKickUser += handleGodlikeKickUser; 1128 client.OnGodKickUser += handleGodlikeKickUser;
1127 client.OnObjectPermissions += HandleObjectPermissionsUpdate; 1129 client.OnObjectPermissions += HandleObjectPermissionsUpdate;
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 505d0bb..a59e7d6 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -137,6 +137,9 @@ namespace SimpleApp
137 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 137 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
138 public event ObjectDeselect OnObjectDeselect; 138 public event ObjectDeselect OnObjectDeselect;
139 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 139 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
140 public event RegionInfoRequest OnRegionInfoRequest;
141 public event EstateCovenantRequest OnEstateCovenantRequest;
142
140 143
141#pragma warning restore 67 144#pragma warning restore 67
142 145
@@ -364,7 +367,9 @@ namespace SimpleApp
364 public void SendAgentAlertMessage(string message, bool modal) 367 public void SendAgentAlertMessage(string message, bool modal)
365 { 368 {
366 } 369 }
367 370 public void SendSystemAlertMessage(string message)
371 {
372 }
368 public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, 373 public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message,
369 string url) 374 string url)
370 { 375 {