Add some conditionals to references to the WorldComm module, so that the
module can be disabled without crashing the simmysql-performance
parent
e7333515d9
commit
9fd9211a38
|
@ -236,6 +236,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
iHttpReq.StopHttpRequest(localID, itemID);
|
||||
|
||||
IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (comms != null)
|
||||
comms.DeleteListener(itemID);
|
||||
|
||||
IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
|
||||
|
|
|
@ -734,6 +734,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ChatTypeEnum.Whisper, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
|
||||
}
|
||||
|
||||
|
@ -754,6 +755,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ChatTypeEnum.Say, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
|
||||
}
|
||||
}
|
||||
|
@ -769,6 +771,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
|
||||
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);
|
||||
}
|
||||
|
||||
|
@ -786,6 +789,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
m_host.AddScriptLPS(1);
|
||||
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
|
||||
}
|
||||
|
||||
|
@ -795,13 +799,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
UUID keyID;
|
||||
UUID.TryParse(ID, out keyID);
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void llListenControl(int number, int active)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
wComm.ListenControl(m_itemID, number, active);
|
||||
}
|
||||
|
||||
|
@ -809,6 +817,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (wComm != null)
|
||||
wComm.ListenRemove(m_itemID, number);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue