diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/FriendsModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/FriendsModule.cs | 13 |
1 files changed, 10 insertions, 3 deletions
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), |