aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs23
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs5
3 files changed, 22 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 9d97cb2..ee32755 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -236,7 +236,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
236 iHttpReq.StopHttpRequest(localID, itemID); 236 iHttpReq.StopHttpRequest(localID, itemID);
237 237
238 IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); 238 IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
239 comms.DeleteListener(itemID); 239 if (comms != null)
240 comms.DeleteListener(itemID);
240 241
241 IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); 242 IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
242 xmlrpc.DeleteChannels(itemID); 243 xmlrpc.DeleteChannels(itemID);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b387728..ec771e3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -749,7 +749,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
749 ChatTypeEnum.Whisper, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); 749 ChatTypeEnum.Whisper, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
750 750
751 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 751 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
752 wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text); 752 if (wComm != null)
753 wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
753 } 754 }
754 755
755 public void llSay(int channelID, string text) 756 public void llSay(int channelID, string text)
@@ -769,7 +770,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
769 ChatTypeEnum.Say, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); 770 ChatTypeEnum.Say, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
770 771
771 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 772 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
772 wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text); 773 if (wComm != null)
774 wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
773 } 775 }
774 } 776 }
775 777
@@ -784,7 +786,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
784 ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); 786 ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
785 787
786 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 788 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
787 wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text); 789 if (wComm != null)
790 wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);
788 } 791 }
789 792
790 public void llRegionSay(int channelID, string text) 793 public void llRegionSay(int channelID, string text)
@@ -801,7 +804,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
801 m_host.AddScriptLPS(1); 804 m_host.AddScriptLPS(1);
802 805
803 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 806 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
804 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); 807 if (wComm != null)
808 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
805 } 809 }
806 810
807 public LSL_Integer llListen(int channelID, string name, string ID, string msg) 811 public LSL_Integer llListen(int channelID, string name, string ID, string msg)
@@ -810,21 +814,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
810 UUID keyID; 814 UUID keyID;
811 UUID.TryParse(ID, out keyID); 815 UUID.TryParse(ID, out keyID);
812 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 816 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
813 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); 817 if (wComm != null)
818 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg);
819 else
820 return -1;
814 } 821 }
815 822
816 public void llListenControl(int number, int active) 823 public void llListenControl(int number, int active)
817 { 824 {
818 m_host.AddScriptLPS(1); 825 m_host.AddScriptLPS(1);
819 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 826 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
820 wComm.ListenControl(m_itemID, number, active); 827 if (wComm != null)
828 wComm.ListenControl(m_itemID, number, active);
821 } 829 }
822 830
823 public void llListenRemove(int number) 831 public void llListenRemove(int number)
824 { 832 {
825 m_host.AddScriptLPS(1); 833 m_host.AddScriptLPS(1);
826 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 834 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
827 wComm.ListenRemove(m_itemID, number); 835 if (wComm != null)
836 wComm.ListenRemove(m_itemID, number);
828 } 837 }
829 838
830 public void llSensor(string name, string id, int type, double range, double arc) 839 public void llSensor(string name, string id, int type, double range, double arc)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
index 0716d45..eeb59d9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
@@ -166,7 +166,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
166 ts.next = DateTime.Now.Ticks + (long)data[idx+1]; 166 ts.next = DateTime.Now.Ticks + (long)data[idx+1];
167 idx += 2; 167 idx += 2;
168 168
169 Timers.Add(MakeTimerKey(localID,itemID), ts); 169 lock (TimerListLock)
170 {
171 Timers.Add(MakeTimerKey(localID, itemID), ts);
172 }
170 } 173 }
171 } 174 }
172 } 175 }