From 2dcf73dd93f2bc8993c2f534ef5ee8c72e24d0f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Mar 2010 14:13:12 -0600 Subject: - supporting llTextBox Signed-off-by: Melanie --- .../CoreModules/Avatar/Dialog/DialogModule.cs | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index fac052a..b8e013c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; @@ -151,7 +152,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog // region as the sending avatar. SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message); } - + + public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid) + { + UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid); + string ownerFirstName, ownerLastName; + if (account != null) + { + ownerFirstName = account.FirstName; + ownerLastName = account.LastName; + } + else + { + ownerFirstName = "(unknown"; + ownerLastName = "user)"; + } + + + ScenePresence sp = m_scene.GetScenePresence(avatarid); + + if (sp != null) { + sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid); + } + } + public void SendNotificationToUsersInRegion( UUID fromAvatarID, string fromAvatarName, string message) { -- cgit v1.1