diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 69 |
1 files changed, 9 insertions, 60 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e8dce08..dcd7f3d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2727,7 +2727,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2727 | IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); | 2727 | IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); |
2728 | if (userVerification != null && ep != null) | 2728 | if (userVerification != null && ep != null) |
2729 | { | 2729 | { |
2730 | if (!userVerification.VerifyClient(aCircuit, ep.Address.ToString())) | 2730 | System.Net.IPAddress addr = NetworkUtil.GetExternalIPOf(ep.Address); |
2731 | |||
2732 | if (!userVerification.VerifyClient(aCircuit, /*ep.Address.ToString() */ addr.ToString())) | ||
2731 | { | 2733 | { |
2732 | // uh-oh, this is fishy | 2734 | // uh-oh, this is fishy |
2733 | m_log.DebugFormat("[Scene]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | 2735 | m_log.DebugFormat("[Scene]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); |
@@ -2785,17 +2787,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2785 | SubscribeToClientPrimEvents(client); | 2787 | SubscribeToClientPrimEvents(client); |
2786 | SubscribeToClientPrimRezEvents(client); | 2788 | SubscribeToClientPrimRezEvents(client); |
2787 | SubscribeToClientInventoryEvents(client); | 2789 | SubscribeToClientInventoryEvents(client); |
2788 | SubscribeToClientAttachmentEvents(client); | ||
2789 | SubscribeToClientTeleportEvents(client); | 2790 | SubscribeToClientTeleportEvents(client); |
2790 | SubscribeToClientScriptEvents(client); | 2791 | SubscribeToClientScriptEvents(client); |
2791 | SubscribeToClientParcelEvents(client); | 2792 | SubscribeToClientParcelEvents(client); |
2792 | SubscribeToClientGridEvents(client); | 2793 | SubscribeToClientGridEvents(client); |
2793 | SubscribeToClientGodEvents(client); | ||
2794 | |||
2795 | SubscribeToClientNetworkEvents(client); | 2794 | SubscribeToClientNetworkEvents(client); |
2796 | |||
2797 | |||
2798 | // EventManager.TriggerOnNewClient(client); | ||
2799 | } | 2795 | } |
2800 | 2796 | ||
2801 | public virtual void SubscribeToClientTerrainEvents(IClientAPI client) | 2797 | public virtual void SubscribeToClientTerrainEvents(IClientAPI client) |
@@ -2805,8 +2801,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2805 | } | 2801 | } |
2806 | 2802 | ||
2807 | public virtual void SubscribeToClientPrimEvents(IClientAPI client) | 2803 | public virtual void SubscribeToClientPrimEvents(IClientAPI client) |
2808 | { | 2804 | { |
2809 | |||
2810 | client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; | 2805 | client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; |
2811 | client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; | 2806 | client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; |
2812 | client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; | 2807 | client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; |
@@ -2876,18 +2871,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2876 | client.OnMoveTaskItem += ClientMoveTaskInventoryItem; | 2871 | client.OnMoveTaskItem += ClientMoveTaskInventoryItem; |
2877 | } | 2872 | } |
2878 | 2873 | ||
2879 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) | ||
2880 | { | ||
2881 | if (AttachmentsModule != null) | ||
2882 | { | ||
2883 | client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; | ||
2884 | client.OnRezMultipleAttachmentsFromInv += AttachmentsModule.RezMultipleAttachmentsFromInventory; | ||
2885 | client.OnObjectAttach += AttachmentsModule.AttachObject; | ||
2886 | client.OnObjectDetach += AttachmentsModule.DetachObject; | ||
2887 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; | ||
2888 | } | ||
2889 | } | ||
2890 | |||
2891 | public virtual void SubscribeToClientTeleportEvents(IClientAPI client) | 2874 | public virtual void SubscribeToClientTeleportEvents(IClientAPI client) |
2892 | { | 2875 | { |
2893 | client.OnTeleportLocationRequest += RequestTeleportLocation; | 2876 | client.OnTeleportLocationRequest += RequestTeleportLocation; |
@@ -2917,44 +2900,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
2917 | client.OnSetStartLocationRequest += SetHomeRezPoint; | 2900 | client.OnSetStartLocationRequest += SetHomeRezPoint; |
2918 | client.OnRegionHandleRequest += RegionHandleRequest; | 2901 | client.OnRegionHandleRequest += RegionHandleRequest; |
2919 | } | 2902 | } |
2920 | 2903 | ||
2921 | public virtual void SubscribeToClientGodEvents(IClientAPI client) | ||
2922 | { | ||
2923 | IGodsModule godsModule = RequestModuleInterface<IGodsModule>(); | ||
2924 | client.OnGodKickUser += godsModule.KickUser; | ||
2925 | client.OnRequestGodlikePowers += godsModule.RequestGodlikePowers; | ||
2926 | } | ||
2927 | |||
2928 | public virtual void SubscribeToClientNetworkEvents(IClientAPI client) | 2904 | public virtual void SubscribeToClientNetworkEvents(IClientAPI client) |
2929 | { | 2905 | { |
2930 | client.OnNetworkStatsUpdate += StatsReporter.AddPacketsStats; | 2906 | client.OnNetworkStatsUpdate += StatsReporter.AddPacketsStats; |
2931 | client.OnViewerEffect += ProcessViewerEffect; | 2907 | client.OnViewerEffect += ProcessViewerEffect; |
2932 | } | 2908 | } |
2933 | 2909 | ||
2934 | protected virtual void UnsubscribeToClientEvents(IClientAPI client) | ||
2935 | { | ||
2936 | } | ||
2937 | |||
2938 | /// <summary> | 2910 | /// <summary> |
2939 | /// Register for events from the client | 2911 | /// Unsubscribe the client from events. |
2940 | /// </summary> | 2912 | /// </summary> |
2941 | /// <param name="client">The IClientAPI of the connected client</param> | 2913 | /// FIXME: Not called anywhere! |
2914 | /// <param name="client">The IClientAPI of the client</param> | ||
2942 | public virtual void UnSubscribeToClientEvents(IClientAPI client) | 2915 | public virtual void UnSubscribeToClientEvents(IClientAPI client) |
2943 | { | 2916 | { |
2944 | UnSubscribeToClientTerrainEvents(client); | 2917 | UnSubscribeToClientTerrainEvents(client); |
2945 | UnSubscribeToClientPrimEvents(client); | 2918 | UnSubscribeToClientPrimEvents(client); |
2946 | UnSubscribeToClientPrimRezEvents(client); | 2919 | UnSubscribeToClientPrimRezEvents(client); |
2947 | UnSubscribeToClientInventoryEvents(client); | 2920 | UnSubscribeToClientInventoryEvents(client); |
2948 | UnSubscribeToClientAttachmentEvents(client); | ||
2949 | UnSubscribeToClientTeleportEvents(client); | 2921 | UnSubscribeToClientTeleportEvents(client); |
2950 | UnSubscribeToClientScriptEvents(client); | 2922 | UnSubscribeToClientScriptEvents(client); |
2951 | UnSubscribeToClientParcelEvents(client); | 2923 | UnSubscribeToClientParcelEvents(client); |
2952 | UnSubscribeToClientGridEvents(client); | 2924 | UnSubscribeToClientGridEvents(client); |
2953 | UnSubscribeToClientGodEvents(client); | ||
2954 | |||
2955 | UnSubscribeToClientNetworkEvents(client); | 2925 | UnSubscribeToClientNetworkEvents(client); |
2956 | |||
2957 | // EventManager.TriggerOnNewClient(client); | ||
2958 | } | 2926 | } |
2959 | 2927 | ||
2960 | public virtual void UnSubscribeToClientTerrainEvents(IClientAPI client) | 2928 | public virtual void UnSubscribeToClientTerrainEvents(IClientAPI client) |
@@ -3031,18 +2999,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3031 | client.OnMoveTaskItem -= ClientMoveTaskInventoryItem; | 2999 | client.OnMoveTaskItem -= ClientMoveTaskInventoryItem; |
3032 | } | 3000 | } |
3033 | 3001 | ||
3034 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) | ||
3035 | { | ||
3036 | if (AttachmentsModule != null) | ||
3037 | { | ||
3038 | client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; | ||
3039 | client.OnRezMultipleAttachmentsFromInv -= AttachmentsModule.RezMultipleAttachmentsFromInventory; | ||
3040 | client.OnObjectAttach -= AttachmentsModule.AttachObject; | ||
3041 | client.OnObjectDetach -= AttachmentsModule.DetachObject; | ||
3042 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; | ||
3043 | } | ||
3044 | } | ||
3045 | |||
3046 | public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) | 3002 | public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) |
3047 | { | 3003 | { |
3048 | client.OnTeleportLocationRequest -= RequestTeleportLocation; | 3004 | client.OnTeleportLocationRequest -= RequestTeleportLocation; |
@@ -3074,13 +3030,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3074 | client.OnRegionHandleRequest -= RegionHandleRequest; | 3030 | client.OnRegionHandleRequest -= RegionHandleRequest; |
3075 | } | 3031 | } |
3076 | 3032 | ||
3077 | public virtual void UnSubscribeToClientGodEvents(IClientAPI client) | ||
3078 | { | ||
3079 | IGodsModule godsModule = RequestModuleInterface<IGodsModule>(); | ||
3080 | client.OnGodKickUser -= godsModule.KickUser; | ||
3081 | client.OnRequestGodlikePowers -= godsModule.RequestGodlikePowers; | ||
3082 | } | ||
3083 | |||
3084 | public virtual void UnSubscribeToClientNetworkEvents(IClientAPI client) | 3033 | public virtual void UnSubscribeToClientNetworkEvents(IClientAPI client) |
3085 | { | 3034 | { |
3086 | client.OnNetworkStatsUpdate -= StatsReporter.AddPacketsStats; | 3035 | client.OnNetworkStatsUpdate -= StatsReporter.AddPacketsStats; |
@@ -5294,4 +5243,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
5294 | return offsets.ToArray(); | 5243 | return offsets.ToArray(); |
5295 | } | 5244 | } |
5296 | } | 5245 | } |
5297 | } | 5246 | } \ No newline at end of file |