diff options
author | Melanie Thielker | 2009-01-09 02:59:56 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-01-09 02:59:56 +0000 |
commit | 7c7ea57c5c2bf01280e2df03cedc999aa5e7be87 (patch) | |
tree | 73f90c8e9e362f7055bccf31af83fe332ce2f9ab /OpenSim | |
parent | * Adds the variables passed to the hashtable BaseHttpServer passes in. (diff) | |
download | opensim-SC-7c7ea57c5c2bf01280e2df03cedc999aa5e7be87.zip opensim-SC-7c7ea57c5c2bf01280e2df03cedc999aa5e7be87.tar.gz opensim-SC-7c7ea57c5c2bf01280e2df03cedc999aa5e7be87.tar.bz2 opensim-SC-7c7ea57c5c2bf01280e2df03cedc999aa5e7be87.tar.xz |
Finish dwell sending, adding the forgotten method body.
Add UserInfo and a dummy reply to enable Hippo Viewer users to
disable IM logging (option was greyed out in OpenSim before)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 65 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 7 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 8 |
5 files changed, 88 insertions, 9 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index cb4af37..cb60028 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -424,6 +424,9 @@ namespace OpenSim.Framework | |||
424 | 424 | ||
425 | public delegate void ParcelDwellRequest(int localID, IClientAPI client); | 425 | public delegate void ParcelDwellRequest(int localID, IClientAPI client); |
426 | 426 | ||
427 | public delegate void UserInfoRequest(IClientAPI client); | ||
428 | public delegate void UpdateUserInfo(bool imViaEmail, bool visible, IClientAPI client); | ||
429 | |||
427 | #endregion | 430 | #endregion |
428 | 431 | ||
429 | public struct DirPlacesReplyData | 432 | public struct DirPlacesReplyData |
@@ -577,7 +580,6 @@ namespace OpenSim.Framework | |||
577 | event AddNewPrim OnAddPrim; | 580 | event AddNewPrim OnAddPrim; |
578 | 581 | ||
579 | event FetchInventory OnAgentDataUpdateRequest; | 582 | event FetchInventory OnAgentDataUpdateRequest; |
580 | event FetchInventory OnUserInfoRequest; | ||
581 | event TeleportLocationRequest OnSetStartLocationRequest; | 583 | event TeleportLocationRequest OnSetStartLocationRequest; |
582 | 584 | ||
583 | event RequestGodlikePowers OnRequestGodlikePowers; | 585 | event RequestGodlikePowers OnRequestGodlikePowers; |
@@ -745,6 +747,9 @@ namespace OpenSim.Framework | |||
745 | 747 | ||
746 | event ParcelDwellRequest OnParcelDwellRequest; | 748 | event ParcelDwellRequest OnParcelDwellRequest; |
747 | 749 | ||
750 | event UserInfoRequest OnUserInfoRequest; | ||
751 | event UpdateUserInfo OnUpdateUserInfo; | ||
752 | |||
748 | // void ActivateGesture(UUID assetId, UUID gestureId); | 753 | // void ActivateGesture(UUID assetId, UUID gestureId); |
749 | 754 | ||
750 | /// <summary> | 755 | /// <summary> |
@@ -1088,6 +1093,8 @@ namespace OpenSim.Framework | |||
1088 | 1093 | ||
1089 | void SendParcelDwellReply(int localID, UUID parcelID, float dwell); | 1094 | void SendParcelDwellReply(int localID, UUID parcelID, float dwell); |
1090 | 1095 | ||
1096 | void SendUserInfoReply(bool imViaEmail, bool visible, string email); | ||
1097 | |||
1091 | void KillEndDone(); | 1098 | void KillEndDone(); |
1092 | 1099 | ||
1093 | bool AddGenericPacketHandler(string MethodName, GenericMessage handler); | 1100 | bool AddGenericPacketHandler(string MethodName, GenericMessage handler); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7398c70..c88e6b5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -147,7 +147,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
147 | private AgentSit handlerAgentSit; //OnAgentSit; | 147 | private AgentSit handlerAgentSit; //OnAgentSit; |
148 | private AvatarPickerRequest handlerAvatarPickerRequest; //OnAvatarPickerRequest; | 148 | private AvatarPickerRequest handlerAvatarPickerRequest; //OnAvatarPickerRequest; |
149 | private FetchInventory handlerAgentDataUpdateRequest; //OnAgentDataUpdateRequest; | 149 | private FetchInventory handlerAgentDataUpdateRequest; //OnAgentDataUpdateRequest; |
150 | private FetchInventory handlerUserInfoRequest; //OnUserInfoRequest; | ||
151 | private TeleportLocationRequest handlerSetStartLocationRequest; //OnSetStartLocationRequest; | 150 | private TeleportLocationRequest handlerSetStartLocationRequest; //OnSetStartLocationRequest; |
152 | private TeleportLandmarkRequest handlerTeleportLandmarkRequest; //OnTeleportLandmarkRequest; | 151 | private TeleportLandmarkRequest handlerTeleportLandmarkRequest; //OnTeleportLandmarkRequest; |
153 | private LinkObjects handlerLinkObjects; //OnLinkObjects; | 152 | private LinkObjects handlerLinkObjects; //OnLinkObjects; |
@@ -288,6 +287,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
288 | 287 | ||
289 | private ParcelDwellRequest handlerParcelDwellRequest; | 288 | private ParcelDwellRequest handlerParcelDwellRequest; |
290 | 289 | ||
290 | private UserInfoRequest handlerUserInfoRequest; | ||
291 | private UpdateUserInfo handlerUpdateUserInfo; | ||
292 | |||
291 | private readonly IGroupsModule m_GroupsModule; | 293 | private readonly IGroupsModule m_GroupsModule; |
292 | 294 | ||
293 | //private TerrainUnacked handlerUnackedTerrain = null; | 295 | //private TerrainUnacked handlerUnackedTerrain = null; |
@@ -939,7 +941,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
939 | public event RequestAvatarProperties OnRequestAvatarProperties; | 941 | public event RequestAvatarProperties OnRequestAvatarProperties; |
940 | public event SetAlwaysRun OnSetAlwaysRun; | 942 | public event SetAlwaysRun OnSetAlwaysRun; |
941 | public event FetchInventory OnAgentDataUpdateRequest; | 943 | public event FetchInventory OnAgentDataUpdateRequest; |
942 | public event FetchInventory OnUserInfoRequest; | ||
943 | public event TeleportLocationRequest OnSetStartLocationRequest; | 944 | public event TeleportLocationRequest OnSetStartLocationRequest; |
944 | public event UpdateAvatarProperties OnUpdateAvatarProperties; | 945 | public event UpdateAvatarProperties OnUpdateAvatarProperties; |
945 | public event CreateNewInventoryItem OnCreateNewInventoryItem; | 946 | public event CreateNewInventoryItem OnCreateNewInventoryItem; |
@@ -1060,6 +1061,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1060 | 1061 | ||
1061 | public event ParcelDwellRequest OnParcelDwellRequest; | 1062 | public event ParcelDwellRequest OnParcelDwellRequest; |
1062 | 1063 | ||
1064 | public event UserInfoRequest OnUserInfoRequest; | ||
1065 | public event UpdateUserInfo OnUpdateUserInfo; | ||
1066 | |||
1063 | public void ActivateGesture(UUID assetId, UUID gestureId) | 1067 | public void ActivateGesture(UUID assetId, UUID gestureId) |
1064 | { | 1068 | { |
1065 | } | 1069 | } |
@@ -4680,15 +4684,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4680 | 4684 | ||
4681 | break; | 4685 | break; |
4682 | case PacketType.UserInfoRequest: | 4686 | case PacketType.UserInfoRequest: |
4683 | UserInfoRequestPacket avUserInfoRequestPacket = (UserInfoRequestPacket)Pack; | ||
4684 | |||
4685 | handlerUserInfoRequest = OnUserInfoRequest; | 4687 | handlerUserInfoRequest = OnUserInfoRequest; |
4686 | if (handlerUserInfoRequest != null) | 4688 | if (handlerUserInfoRequest != null) |
4687 | { | 4689 | { |
4688 | handlerUserInfoRequest(this, avUserInfoRequestPacket.AgentData.AgentID, avUserInfoRequestPacket.AgentData.SessionID); | 4690 | handlerUserInfoRequest(this); |
4691 | } | ||
4692 | else | ||
4693 | { | ||
4694 | SendUserInfoReply(false, true, ""); | ||
4689 | } | 4695 | } |
4690 | break; | 4696 | break; |
4697 | case PacketType.UpdateUserInfo: | ||
4698 | UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack; | ||
4699 | handlerUpdateUserInfo = OnUpdateUserInfo; | ||
4700 | if (handlerUpdateUserInfo != null) | ||
4701 | { | ||
4702 | bool visible = true; | ||
4703 | string DirectoryVisibility = | ||
4704 | Utils.BytesToString(updateUserInfo.UserData.DirectoryVisibility); | ||
4705 | if (DirectoryVisibility == "hidden") | ||
4706 | visible = false; | ||
4691 | 4707 | ||
4708 | handlerUpdateUserInfo( | ||
4709 | updateUserInfo.UserData.IMViaEMail, | ||
4710 | visible, this); | ||
4711 | } | ||
4712 | break; | ||
4692 | case PacketType.SetStartLocationRequest: | 4713 | case PacketType.SetStartLocationRequest: |
4693 | SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; | 4714 | SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; |
4694 | 4715 | ||
@@ -8302,6 +8323,40 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8302 | 8323 | ||
8303 | public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) | 8324 | public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) |
8304 | { | 8325 | { |
8326 | ParcelDwellReplyPacket pd = | ||
8327 | (ParcelDwellReplyPacket)PacketPool.Instance.GetPacket( | ||
8328 | PacketType.ParcelDwellReply); | ||
8329 | |||
8330 | pd.AgentData = new ParcelDwellReplyPacket.AgentDataBlock(); | ||
8331 | pd.AgentData.AgentID = AgentId; | ||
8332 | |||
8333 | pd.Data = new ParcelDwellReplyPacket.DataBlock(); | ||
8334 | pd.Data.LocalID = localID; | ||
8335 | pd.Data.ParcelID = parcelID; | ||
8336 | pd.Data.Dwell = dwell; | ||
8337 | |||
8338 | OutPacket(pd, ThrottleOutPacketType.Land); | ||
8339 | } | ||
8340 | |||
8341 | public void SendUserInfoReply(bool imViaEmail, bool visible, string email) | ||
8342 | { | ||
8343 | UserInfoReplyPacket ur = | ||
8344 | (UserInfoReplyPacket)PacketPool.Instance.GetPacket( | ||
8345 | PacketType.UserInfoReply); | ||
8346 | |||
8347 | string Visible = "hidden"; | ||
8348 | if (visible) | ||
8349 | Visible = "default"; | ||
8350 | |||
8351 | ur.AgentData = new UserInfoReplyPacket.AgentDataBlock(); | ||
8352 | ur.AgentData.AgentID = AgentId; | ||
8353 | |||
8354 | ur.UserData = new UserInfoReplyPacket.UserDataBlock(); | ||
8355 | ur.UserData.IMViaEMail = imViaEmail; | ||
8356 | ur.UserData.DirectoryVisibility = Utils.StringToBytes(Visible); | ||
8357 | ur.UserData.EMail = Utils.StringToBytes(email); | ||
8358 | |||
8359 | OutPacket(ur, ThrottleOutPacketType.Task); | ||
8305 | } | 8360 | } |
8306 | 8361 | ||
8307 | public void KillEndDone() | 8362 | public void KillEndDone() |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 2b91391..d06f35a 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -204,7 +204,6 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
204 | public event ViewerEffectEventHandler OnViewerEffect; | 204 | public event ViewerEffectEventHandler OnViewerEffect; |
205 | 205 | ||
206 | public event FetchInventory OnAgentDataUpdateRequest; | 206 | public event FetchInventory OnAgentDataUpdateRequest; |
207 | public event FetchInventory OnUserInfoRequest; | ||
208 | public event TeleportLocationRequest OnSetStartLocationRequest; | 207 | public event TeleportLocationRequest OnSetStartLocationRequest; |
209 | 208 | ||
210 | public event UpdateShape OnUpdatePrimShape; | 209 | public event UpdateShape OnUpdatePrimShape; |
@@ -357,6 +356,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
357 | 356 | ||
358 | public event ParcelDwellRequest OnParcelDwellRequest; | 357 | public event ParcelDwellRequest OnParcelDwellRequest; |
359 | 358 | ||
359 | public event UserInfoRequest OnUserInfoRequest; | ||
360 | public event UpdateUserInfo OnUpdateUserInfo; | ||
361 | |||
360 | #pragma warning restore 67 | 362 | #pragma warning restore 67 |
361 | 363 | ||
362 | #endregion | 364 | #endregion |
@@ -1045,6 +1047,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
1045 | { | 1047 | { |
1046 | } | 1048 | } |
1047 | 1049 | ||
1050 | public void SendUserInfoReply(bool imViaEmail, bool visible, string email) | ||
1051 | { | ||
1052 | } | ||
1053 | |||
1048 | #endregion | 1054 | #endregion |
1049 | } | 1055 | } |
1050 | } | 1056 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 8cfaf88..5a7d42c 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -98,7 +98,6 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
98 | public event ViewerEffectEventHandler OnViewerEffect; | 98 | public event ViewerEffectEventHandler OnViewerEffect; |
99 | 99 | ||
100 | public event FetchInventory OnAgentDataUpdateRequest; | 100 | public event FetchInventory OnAgentDataUpdateRequest; |
101 | public event FetchInventory OnUserInfoRequest; | ||
102 | public event TeleportLocationRequest OnSetStartLocationRequest; | 101 | public event TeleportLocationRequest OnSetStartLocationRequest; |
103 | 102 | ||
104 | public event UpdateShape OnUpdatePrimShape; | 103 | public event UpdateShape OnUpdatePrimShape; |
@@ -251,6 +250,8 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
251 | public event EventGodDelete OnEventGodDelete; | 250 | public event EventGodDelete OnEventGodDelete; |
252 | 251 | ||
253 | public event ParcelDwellRequest OnParcelDwellRequest; | 252 | public event ParcelDwellRequest OnParcelDwellRequest; |
253 | public event UserInfoRequest OnUserInfoRequest; | ||
254 | public event UpdateUserInfo OnUpdateUserInfo; | ||
254 | 255 | ||
255 | #pragma warning restore 67 | 256 | #pragma warning restore 67 |
256 | 257 | ||
@@ -1046,6 +1047,10 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
1046 | { | 1047 | { |
1047 | } | 1048 | } |
1048 | 1049 | ||
1050 | public void SendUserInfoReply(bool imViaEmail, bool visible, string email) | ||
1051 | { | ||
1052 | } | ||
1053 | |||
1049 | #endregion | 1054 | #endregion |
1050 | } | 1055 | } |
1051 | } | 1056 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 83bd9d9..b5d6f6b 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -93,7 +93,6 @@ namespace OpenSim.Tests.Common.Mock | |||
93 | public event ViewerEffectEventHandler OnViewerEffect; | 93 | public event ViewerEffectEventHandler OnViewerEffect; |
94 | 94 | ||
95 | public event FetchInventory OnAgentDataUpdateRequest; | 95 | public event FetchInventory OnAgentDataUpdateRequest; |
96 | public event FetchInventory OnUserInfoRequest; | ||
97 | public event TeleportLocationRequest OnSetStartLocationRequest; | 96 | public event TeleportLocationRequest OnSetStartLocationRequest; |
98 | 97 | ||
99 | public event UpdateShape OnUpdatePrimShape; | 98 | public event UpdateShape OnUpdatePrimShape; |
@@ -248,6 +247,9 @@ namespace OpenSim.Tests.Common.Mock | |||
248 | 247 | ||
249 | public event ParcelDwellRequest OnParcelDwellRequest; | 248 | public event ParcelDwellRequest OnParcelDwellRequest; |
250 | 249 | ||
250 | public event UserInfoRequest OnUserInfoRequest; | ||
251 | public event UpdateUserInfo OnUpdateUserInfo; | ||
252 | |||
251 | #pragma warning restore 67 | 253 | #pragma warning restore 67 |
252 | 254 | ||
253 | /// <value> | 255 | /// <value> |
@@ -991,5 +993,9 @@ namespace OpenSim.Tests.Common.Mock | |||
991 | public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) | 993 | public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) |
992 | { | 994 | { |
993 | } | 995 | } |
996 | |||
997 | public void SendUserInfoReply(bool imViaEmail, bool visible, string email) | ||
998 | { | ||
999 | } | ||
994 | } | 1000 | } |
995 | } | 1001 | } |