to do that don't use slideexpiration; add cap event ChatterBoxForceClose

LSLKeyTest
UbitUmarov 2016-08-11 08:38:39 +01:00
parent b16d6c0302
commit 9aa2484f0d
5 changed files with 33 additions and 7 deletions

View File

@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.Linden
caps.RegisterPollHandler(
"EventQueueGet",
new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, SERVER_EQ_TIME_NO_EVENTS));
new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, Drop, agentID, SERVER_EQ_TIME_NO_EVENTS));
}
public bool HasEvents(UUID requestID, UUID agentID)
@ -577,6 +577,14 @@ namespace OpenSim.Region.ClientStack.Linden
//m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item);
}
public void ChatterBoxForceClose(UUID toAgent, UUID sessionID, string reason)
{
OSD item = EventQueueHelper.ChatterBoxForceClose(sessionID, reason);
Enqueue(item, toAgent);
//m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item);
}
public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
{
OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage);

View File

@ -342,6 +342,18 @@ namespace OpenSim.Region.ClientStack.Linden
return chatterBoxSessionAgentListUpdates;
}
public static OSD ChatterBoxForceClose(UUID sessionID, string reason)
{
OSDMap body = new OSDMap(2);
body.Add("session_id", new OSDUUID(sessionID));
body.Add("reason", new OSDString(reason));
OSDMap chatterBoxForceClose = new OSDMap(2);
chatterBoxForceClose.Add("message", new OSDString("ForceCloseChatterBoxSession"));
chatterBoxForceClose.Add("body", body);
return chatterBoxForceClose;
}
public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
{
OSDArray AgentData = new OSDArray(1);

View File

@ -52,11 +52,12 @@ namespace OpenSim.Region.Framework.Interfaces
string capsURL, UUID avatarID, UUID sessionID,
int regionSizeX, int regionSizeY);
void ChatterboxInvitation(UUID sessionID, string sessionName,
UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
uint timeStamp, bool offline, int parentEstateID, Vector3 position,
uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket);
void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat,
bool isModerator, bool textMute, bool isEnterorLeave);
UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
uint timeStamp, bool offline, int parentEstateID, Vector3 position,
uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket);
void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent,
bool canVoiceChat, bool isModerator, bool textMute, bool isEnterorLeave);
void ChatterBoxForceClose(UUID toAgent, UUID sessionID, string reason);
void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID);
void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data);
OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono);

View File

@ -1011,7 +1011,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
if ((m_cacheTimeout > 0) && (CacheKey != null))
{
m_memoryCache.AddOrUpdate(CacheKey, resp, TimeSpan.FromSeconds(10));
m_memoryCache.AddOrUpdate(CacheKey, resp, 10.0);
}
}

View File

@ -152,6 +152,11 @@ namespace OpenSim.Tests.Common
AddEvent(toAgent, "ChatterBoxSessionAgentListUpdates", sessionID, fromAgent, canVoiceChat, isModerator, textMute, isEnterorLeave);
}
public void ChatterBoxForceClose (UUID toAgent, UUID sessionID, string reason)
{
AddEvent(toAgent, "ForceCloseChatterBoxSession", sessionID, reason);
}
public void ParcelProperties (OpenMetaverse.Messages.Linden.ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
{
AddEvent(avatarID, "ParcelProperties", parcelPropertiesMessage);