public void llRegionSayTo(LSL_Key toID, int channelID, string text)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
IChatModule chatModule = World.RequestModuleInterface<IChatModule>();
if (text.Length > 1023)
text = text.Substring(0, 1023);
if (channelID == 0)
{
IScenePresence presence = World.GetScenePresence(UUID.Parse(toID.m_string));
if (presence != null)
{
if (chatModule != null)
chatModule.TrySendChatMessage(presence, m_host.AbsolutePosition, m_host.AbsolutePosition,
m_host.UUID, m_host.Name, ChatTypeEnum.Say, text, ChatSourceType.Object, 10000);
}
}
if (m_comms != null)
m_comms.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, UUID.Parse(toID.m_string), text);
}