diff options
author | Teravus Ovares | 2008-01-02 03:05:18 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-02 03:05:18 +0000 |
commit | 2f435783866656f8e75ba96febe688378ff320b0 (patch) | |
tree | 4d1b4351b8cb10132c4cbd7a26d78fa2d2ffe3eb | |
parent | * Updates UserServer (diff) | |
download | opensim-SC_OLD-2f435783866656f8e75ba96febe688378ff320b0.zip opensim-SC_OLD-2f435783866656f8e75ba96febe688378ff320b0.tar.gz opensim-SC_OLD-2f435783866656f8e75ba96febe688378ff320b0.tar.bz2 opensim-SC_OLD-2f435783866656f8e75ba96febe688378ff320b0.tar.xz |
* Re-wrote IM that sends the friend request so that it displays the name of the person who sent the request, or (hippos) if it can't find it.
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/FriendsModule.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/InstantMessageModule.cs | 4 |
4 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index c5e4809..f0ec63e 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -223,7 +223,7 @@ namespace OpenSim.Framework | |||
223 | 223 | ||
224 | public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); | 224 | public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); |
225 | 225 | ||
226 | public delegate void ImprovedInstantMessage( | 226 | public delegate void ImprovedInstantMessage(IClientAPI remoteclient, |
227 | LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, | 227 | LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, |
228 | string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, | 228 | string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, |
229 | LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... | 229 | LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index aa8ab1d..414916c 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -2550,7 +2550,7 @@ namespace OpenSim.Region.ClientStack | |||
2550 | string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); | 2550 | string IMmessage = Helpers.FieldToUTF8String(msgpack.MessageBlock.Message); |
2551 | if (OnInstantMessage != null) | 2551 | if (OnInstantMessage != null) |
2552 | { | 2552 | { |
2553 | OnInstantMessage(msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, | 2553 | OnInstantMessage(this,msgpack.AgentData.AgentID, msgpack.AgentData.SessionID, |
2554 | msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID, | 2554 | msgpack.MessageBlock.ToAgentID, msgpack.MessageBlock.ID, |
2555 | msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, | 2555 | msgpack.MessageBlock.Timestamp, IMfromName, IMmessage, |
2556 | msgpack.MessageBlock.Dialog, msgpack.MessageBlock.FromGroup, | 2556 | msgpack.MessageBlock.Dialog, msgpack.MessageBlock.FromGroup, |
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index d6be63b..fec28a8 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules | |||
72 | 72 | ||
73 | 73 | ||
74 | } | 74 | } |
75 | private void OnInstantMessage(LLUUID fromAgentID, | 75 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, |
76 | LLUUID fromAgentSession, LLUUID toAgentID, | 76 | LLUUID fromAgentSession, LLUUID toAgentID, |
77 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 77 | LLUUID imSessionID, uint timestamp, string fromAgentName, |
78 | string message, byte dialog, bool fromGroup, byte offline, | 78 | string message, byte dialog, bool fromGroup, byte offline, |
@@ -97,7 +97,14 @@ namespace OpenSim.Region.Environment.Modules | |||
97 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here | 97 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here |
98 | m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString()); | 98 | m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString()); |
99 | msg.timestamp = timestamp; | 99 | msg.timestamp = timestamp; |
100 | msg.fromAgentName = fromAgentName; | 100 | if (client != null) |
101 | { | ||
102 | msg.fromAgentName = client.FirstName + " " + client.LastName;// fromAgentName; | ||
103 | } | ||
104 | else | ||
105 | { | ||
106 | msg.fromAgentName = "(hippos)";// Added for posterity. This means that we can't figure out who sent it | ||
107 | } | ||
101 | msg.message = message; | 108 | msg.message = message; |
102 | msg.dialog = dialog; | 109 | msg.dialog = dialog; |
103 | msg.fromGroup = fromGroup; | 110 | msg.fromGroup = fromGroup; |
@@ -194,7 +201,7 @@ namespace OpenSim.Region.Environment.Modules | |||
194 | private void OnGridInstantMessage(GridInstantMessage msg) | 201 | private void OnGridInstantMessage(GridInstantMessage msg) |
195 | { | 202 | { |
196 | // Trigger the above event handler | 203 | // Trigger the above event handler |
197 | OnInstantMessage(new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), | 204 | OnInstantMessage(null,new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), |
198 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, | 205 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, |
199 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 206 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
200 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 207 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), |
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index 0967b70..f5eb052 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Environment.Modules | |||
61 | client.OnInstantMessage += OnInstantMessage; | 61 | client.OnInstantMessage += OnInstantMessage; |
62 | } | 62 | } |
63 | 63 | ||
64 | private void OnInstantMessage(LLUUID fromAgentID, | 64 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, |
65 | LLUUID fromAgentSession, LLUUID toAgentID, | 65 | LLUUID fromAgentSession, LLUUID toAgentID, |
66 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 66 | LLUUID imSessionID, uint timestamp, string fromAgentName, |
67 | string message, byte dialog, bool fromGroup, byte offline, | 67 | string message, byte dialog, bool fromGroup, byte offline, |
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules | |||
105 | private void OnGridInstantMessage(GridInstantMessage msg) | 105 | private void OnGridInstantMessage(GridInstantMessage msg) |
106 | { | 106 | { |
107 | // Trigger the above event handler | 107 | // Trigger the above event handler |
108 | OnInstantMessage(new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), | 108 | OnInstantMessage(null,new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), |
109 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, | 109 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, |
110 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 110 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
111 | new LLVector3(msg.Position.x,msg.Position.y,msg.Position.z), new LLUUID(msg.RegionID), | 111 | new LLVector3(msg.Position.x,msg.Position.y,msg.Position.z), new LLUUID(msg.RegionID), |