Split IM handling so an inheriting module can cange names if required.

LSLKeyTest
Melanie Thielker 2016-06-21 00:21:08 +02:00
parent 34b308d5b6
commit 9de8cefee5
1 changed files with 6 additions and 2 deletions

View File

@ -154,6 +154,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
#endregion #endregion
public virtual void OnViewerInstantMessage(IClientAPI client, GridInstantMessage im)
{
im.fromAgentName = client.FirstName + " " + client.LastName;
OnInstantMessage(client, im);
}
public virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im) public virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im)
{ {
byte dialog = im.dialog; byte dialog = im.dialog;
@ -198,8 +204,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
if (m_TransferModule != null) if (m_TransferModule != null)
{ {
if (client != null)
im.fromAgentName = client.FirstName + " " + client.LastName;
m_TransferModule.SendInstantMessage(im, m_TransferModule.SendInstantMessage(im,
delegate(bool success) delegate(bool success)
{ {