diff options
author | Dr Scofield | 2008-10-03 14:53:11 +0000 |
---|---|---|
committer | Dr Scofield | 2008-10-03 14:53:11 +0000 |
commit | 5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a (patch) | |
tree | 529c2c8e3ea8f1193f2495f905e542ff1462adb6 /OpenSim/Region/ClientStack | |
parent | * minor: remove warnings (the code cleaners strike again) (diff) | |
download | opensim-SC-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.zip opensim-SC-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.tar.gz opensim-SC-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.tar.bz2 opensim-SC-5c0a0bc2e0951745fd52f5c01f2ee2c0aee49a3a.tar.xz |
This changeset changes the way chat from client is routed:
old way: each region module interested in chat from client had to
- subscribe to scene.EventManager.OnNewClient
- then in its OnNewClient delegate it would subscribe to
client.OnChatFromViewer to capture chat messages coming
new way: ChatModule is the only region module that uses the "old
way" approach but is now forwarding all client chat via
scene.EventManager.OnChatFromClient
- each region module interested in chat from client now only
subscribes to scene.EventManager.OnChatFromClient
this not only simplifies code, but also allows us to substitute
ChatModule with derived classes (ConciergeModule is going to be one
example).
Also, this changeset changes ChatFromViewer to ChatFromClient as it
doesn't necessarily have to be a viewer that is a chat source.
i've taken great care to only comment out those OnNewClient delegates
that were only used for getting at the client chat --- hope it's not
breaking anything.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index af760ae..199954e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -124,8 +124,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
124 | private GenericMessage handlerGenericMessage = null; | 124 | private GenericMessage handlerGenericMessage = null; |
125 | private RequestAvatarProperties handlerRequestAvatarProperties = null; //OnRequestAvatarProperties; | 125 | private RequestAvatarProperties handlerRequestAvatarProperties = null; //OnRequestAvatarProperties; |
126 | private UpdateAvatarProperties handlerUpdateAvatarProperties = null; // OnUpdateAvatarProperties; | 126 | private UpdateAvatarProperties handlerUpdateAvatarProperties = null; // OnUpdateAvatarProperties; |
127 | private ChatMessage handlerChatFromViewer = null; //OnChatFromViewer; | 127 | private ChatMessage handlerChatFromClient = null; //OnChatFromClient; |
128 | private ChatMessage handlerChatFromViewer2 = null; //OnChatFromViewer; | 128 | private ChatMessage handlerChatFromClient2 = null; //OnChatFromClient; |
129 | private ImprovedInstantMessage handlerInstantMessage = null; //OnInstantMessage; | 129 | private ImprovedInstantMessage handlerInstantMessage = null; //OnInstantMessage; |
130 | private FriendActionDelegate handlerApproveFriendRequest = null; //OnApproveFriendRequest; | 130 | private FriendActionDelegate handlerApproveFriendRequest = null; //OnApproveFriendRequest; |
131 | private FriendshipTermination handlerTerminateFriendship = null; //OnTerminateFriendship; | 131 | private FriendshipTermination handlerTerminateFriendship = null; //OnTerminateFriendship; |
@@ -393,7 +393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
393 | /// <param name="circuitCode"></param> | 393 | /// <param name="circuitCode"></param> |
394 | /// <param name="proxyEP"></param> | 394 | /// <param name="proxyEP"></param> |
395 | public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, | 395 | public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, |
396 | AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP) | 396 | AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP) |
397 | { | 397 | { |
398 | m_moneyBalance = 1000; | 398 | m_moneyBalance = 1000; |
399 | 399 | ||
@@ -833,7 +833,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
833 | public event Action<IClientAPI> OnConnectionClosed; | 833 | public event Action<IClientAPI> OnConnectionClosed; |
834 | public event ViewerEffectEventHandler OnViewerEffect; | 834 | public event ViewerEffectEventHandler OnViewerEffect; |
835 | public event ImprovedInstantMessage OnInstantMessage; | 835 | public event ImprovedInstantMessage OnInstantMessage; |
836 | public event ChatMessage OnChatFromViewer; | 836 | public event ChatMessage OnChatFromClient; |
837 | public event TextureRequest OnRequestTexture; | 837 | public event TextureRequest OnRequestTexture; |
838 | public event RezObject OnRezObject; | 838 | public event RezObject OnRezObject; |
839 | public event GenericCall4 OnDeRezObject; | 839 | public event GenericCall4 OnDeRezObject; |
@@ -4008,7 +4008,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4008 | 4008 | ||
4009 | int channel = inchatpack.ChatData.Channel; | 4009 | int channel = inchatpack.ChatData.Channel; |
4010 | 4010 | ||
4011 | if (OnChatFromViewer != null) | 4011 | if (OnChatFromClient != null) |
4012 | { | 4012 | { |
4013 | OSChatMessage args = new OSChatMessage(); | 4013 | OSChatMessage args = new OSChatMessage(); |
4014 | args.Channel = channel; | 4014 | args.Channel = channel; |
@@ -4020,9 +4020,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4020 | args.Scene = Scene; | 4020 | args.Scene = Scene; |
4021 | args.Sender = this; | 4021 | args.Sender = this; |
4022 | 4022 | ||
4023 | handlerChatFromViewer = OnChatFromViewer; | 4023 | handlerChatFromClient = OnChatFromClient; |
4024 | if (handlerChatFromViewer != null) | 4024 | if (handlerChatFromClient != null) |
4025 | handlerChatFromViewer(this, args); | 4025 | handlerChatFromClient(this, args); |
4026 | } | 4026 | } |
4027 | break; | 4027 | break; |
4028 | case PacketType.AvatarPropertiesUpdate: | 4028 | case PacketType.AvatarPropertiesUpdate: |
@@ -4047,7 +4047,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4047 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; | 4047 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; |
4048 | int ch = rdialog.Data.ChatChannel; | 4048 | int ch = rdialog.Data.ChatChannel; |
4049 | byte[] msg = rdialog.Data.ButtonLabel; | 4049 | byte[] msg = rdialog.Data.ButtonLabel; |
4050 | if (OnChatFromViewer != null) | 4050 | if (OnChatFromClient != null) |
4051 | { | 4051 | { |
4052 | OSChatMessage args = new OSChatMessage(); | 4052 | OSChatMessage args = new OSChatMessage(); |
4053 | args.Channel = ch; | 4053 | args.Channel = ch; |
@@ -4057,9 +4057,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4057 | args.Position = new Vector3(); | 4057 | args.Position = new Vector3(); |
4058 | args.Scene = Scene; | 4058 | args.Scene = Scene; |
4059 | args.Sender = this; | 4059 | args.Sender = this; |
4060 | handlerChatFromViewer2 = OnChatFromViewer; | 4060 | handlerChatFromClient2 = OnChatFromClient; |
4061 | if (handlerChatFromViewer2 != null) | 4061 | if (handlerChatFromClient2 != null) |
4062 | handlerChatFromViewer2(this, args); | 4062 | handlerChatFromClient2(this, args); |
4063 | } | 4063 | } |
4064 | 4064 | ||
4065 | break; | 4065 | break; |