more eventqueue IM nonsense

0.6.3-post-fixes
Dahlia Trimble 2009-01-26 08:04:12 +00:00
parent 5bd0947f7e
commit fa99f01378
2 changed files with 35 additions and 7 deletions

View File

@ -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);

View File

@ -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;
}
}
}