aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorDr Scofield2008-05-23 16:07:47 +0000
committerDr Scofield2008-05-23 16:07:47 +0000
commit09188d5d10e279583c0e6074d38a1ac99abb7e43 (patch)
treef2bfcd205cac6657d219d9b20086d362915bf51d /OpenSim/Region/ClientStack
parent*Refactor of the LandManagementModule that allows OpenSim to run without it (diff)
downloadopensim-SC-09188d5d10e279583c0e6074d38a1ac99abb7e43.zip
opensim-SC-09188d5d10e279583c0e6074d38a1ac99abb7e43.tar.gz
opensim-SC-09188d5d10e279583c0e6074d38a1ac99abb7e43.tar.bz2
opensim-SC-09188d5d10e279583c0e6074d38a1ac99abb7e43.tar.xz
IRCBridgeModule (and ChatModule before the refactoring) didn't succeed in
finding out which region a new avatar was logging in to; the same problem occurred when the client/avatar logged out. the reason was mani-fold: - Scene.AddNewClient(...) would call SubscribeToClientEvents(client) which would subscribe to all client events and then call TriggerOnNewClient(...) BEFORE the ScenePresence object had even been created and added. i've moved the TriggerOnNewClient() call to the end of Scene.AddNewClient() - Scene.AddNewClient(...) is called with child == true; a later call to ScenePresence.MakeRootAgent() will turn child to false. When OnNewClient is triggered, child is still true, causing IRCBridgeModule's FindClientRegion to ignore the ScenePresence of the new avatar. i've changed IRCBridgeModule to still use OnNewClient and also OnLogout and OnConnectionClosed but only to signal that the avatar has logged on (logged off respectively). to track whether an avatar has actually entered a region i've added EventManager.OnMakeRootAgent (complementing OnMakeChildAgent). also, i've cleaned up the internal IRCModule code a bit. currently it still uses IClientAPI.SendChatMessage() which replicates the code in ChatModule, that needs to be changed to use TriggerOnChatFromWorld().
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 93ce29e..c1c4af2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -930,12 +930,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
930 /// <param name="fromPos"></param> 930 /// <param name="fromPos"></param>
931 /// <param name="fromName"></param> 931 /// <param name="fromName"></param>
932 /// <param name="fromAgentID"></param> 932 /// <param name="fromAgentID"></param>
933 public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible) 933 public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName,
934 LLUUID fromAgentID, byte source, byte audible)
934 { 935 {
935 SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID, source, audible); 936 SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID, source, audible);
936 } 937 }
937 938
938 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID, byte source, byte audible) 939 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName,
940 LLUUID fromAgentID, byte source, byte audible)
939 { 941 {
940 ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator); 942 ChatFromSimulatorPacket reply = (ChatFromSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.ChatFromSimulator);
941 reply.ChatData.Audible = audible; 943 reply.ChatData.Audible = audible;