Add a state change method to the Async commands handler to allow timers

and http requests to survive state changes
avinationmerge
Melanie Thielker 2010-07-18 21:05:50 +02:00
parent c088397ec7
commit c263fc54ac
1 changed files with 20 additions and 0 deletions

View File

@ -248,6 +248,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
public static void StateChange(IScriptEngine engine, uint localID, UUID itemID)
{
// Remove a specific script
// Remove dataserver events
m_Dataserver[engine].RemoveEvents(localID, itemID);
IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
if (comms != null)
comms.DeleteListener(itemID);
IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
xmlrpc.DeleteChannels(itemID);
xmlrpc.CancelSRDRequests(itemID);
// Remove Sensors
m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID);
}
public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID)
{ {
List<Object> data = new List<Object>(); List<Object> data = new List<Object>();