From fa99f013786f282d4266553477fcb1beb078e4d0 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Mon, 26 Jan 2009 08:04:12 +0000 Subject: more eventqueue IM nonsense --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 15 ++++++------ .../Framework/EventQueue/EventQueueHelper.cs | 27 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 83ae115..e8e674f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1214,19 +1214,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP { dialog = 17; - //OSD Item = Environment.EventQueueHelper.ChatterboxInvitation( - // new UUID("00000000-68f9-1111-024e-222222111123"), - // "Test Group", fromAgent, message, toAgent, fromName, dialog, 0, - // false, 0, new Vector3(), 1, transactionID, fromGroup, - // Utils.StringToBytes("Test Group")); - OSD Item = Environment.EventQueueHelper.ChatterboxInvitation( new UUID("00000000-68f9-1111-024e-222222111123"), "Test Group", fromAgent, message, toAgent, fromName, dialog, 0, false, 0, new Vector3(), 1, transactionID, fromGroup, binaryBucket); eq.Enqueue(Item, toAgent); - m_log.Info("########### eq chatterbox invitation #############\n" + Item); + m_log.Info("########### eq ChatterboxInvitation #############\n" + Item); + + Item = Environment.EventQueueHelper.ChatterBoxSessionAgentListUpdates( + new UUID("00000000-68f9-1111-024e-222222111123"), + fromAgent, false, false, false); + + eq.Enqueue(Item, toAgent); + m_log.Info("########### eq ChatterBoxSessionAgentListUpdates #############\n" + Item); } System.Console.WriteLine("SendInstantMessage: " + msg); diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs index 5f471e5..b74375f 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueue/EventQueueHelper.cs @@ -275,5 +275,32 @@ namespace OpenSim.Region.Environment chatterboxInvitation.Add("body", body); return chatterboxInvitation; } + + public static OSD ChatterBoxSessionAgentListUpdates(UUID sessionID, + UUID agentID, bool canVoiceChat, bool isModerator, bool textMute) + { + OSDMap body = new OSDMap(); + OSDMap agentUpdates = new OSDMap(); + OSDMap infoDetail = new OSDMap(); + OSDMap mutes = new OSDMap(); + + mutes.Add("text", OSD.FromBoolean(textMute)); + infoDetail.Add("can_voice_chat", OSD.FromBoolean(canVoiceChat)); + infoDetail.Add("is_moderator", OSD.FromBoolean(isModerator)); + infoDetail.Add("mutes", mutes); + OSDMap info = new OSDMap(); + info.Add("info", infoDetail); + agentUpdates.Add(agentID.ToString(), info); + body.Add("agent_updates", agentUpdates); + body.Add("session_id", OSD.FromUUID(sessionID)); + body.Add("updates", new OSD()); + + OSDMap chatterBoxSessionAgentListUpdates = new OSDMap(); + chatterBoxSessionAgentListUpdates.Add("message", OSD.FromString("ChatterBoxSessionAgentListUpdates")); + chatterBoxSessionAgentListUpdates.Add("body", body); + + return chatterBoxSessionAgentListUpdates; + } + } } -- cgit v1.1