From 9de8cefee55a23149b09d55339736bb324856ad9 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 21 Jun 2016 00:21:08 +0200 Subject: [PATCH] Split IM handling so an inheriting module can cange names if required. --- .../Avatar/InstantMessage/InstantMessageModule.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index fb868be6ed..2ba35df092 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -154,6 +154,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage #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) { byte dialog = im.dialog; @@ -198,8 +204,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage if (m_TransferModule != null) { - if (client != null) - im.fromAgentName = client.FirstName + " " + client.LastName; m_TransferModule.SendInstantMessage(im, delegate(bool success) {