aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2008-05-26 15:37:31 +0000
committerDr Scofield2008-05-26 15:37:31 +0000
commit1bb1d5d9b06887380eec0696102eb859f04810e6 (patch)
treefecd69763a3daeba464a1bcbc1349828dd9445b3
parentAdding OnChatBroadcast event logic to EventManager providing (diff)
downloadopensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.zip
opensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.tar.gz
opensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.tar.bz2
opensim-SC_OLD-1bb1d5d9b06887380eec0696102eb859f04810e6.tar.xz
This cleans up a merge mess from the earlier checkin and implements llOwnerSay()
via the newly created Scene.SimBroadcast() call.
-rw-r--r--OpenSim/Framework/IClientAPI.cs13
-rw-r--r--OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs1
-rw-r--r--OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs10
-rw-r--r--OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs34
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs29
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs61
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs22
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs4
12 files changed, 123 insertions, 87 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 0823b0d..7fb8091 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -85,6 +85,7 @@ namespace OpenSim.Framework
85 85
86 protected IScene m_scene; 86 protected IScene m_scene;
87 protected IClientAPI m_sender; 87 protected IClientAPI m_sender;
88 protected object m_senderObject;
88 protected ChatTypeEnum m_type; 89 protected ChatTypeEnum m_type;
89 protected LLUUID m_fromID; 90 protected LLUUID m_fromID;
90 91
@@ -140,6 +141,9 @@ namespace OpenSim.Framework
140 141
141 #region IEventArgs Members 142 #region IEventArgs Members
142 143
144 /// TODO: Sender and SenderObject should just be Sender and of
145 /// type IChatSender
146
143 /// <summary> 147 /// <summary>
144 /// The client responsible for sending the message, or null. 148 /// The client responsible for sending the message, or null.
145 /// </summary> 149 /// </summary>
@@ -149,6 +153,15 @@ namespace OpenSim.Framework
149 set { m_sender = value; } 153 set { m_sender = value; }
150 } 154 }
151 155
156 /// <summary>
157 /// The object responsible for sending the message, or null.
158 /// </summary>
159 public object SenderObject
160 {
161 get { return m_senderObject; }
162 set { m_senderObject = value; }
163 }
164
152 public LLUUID SenderUUID 165 public LLUUID SenderUUID
153 { 166 {
154 get { return m_fromID; } 167 get { return m_fromID; }
diff --git a/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index 3411465..422af46 100644
--- a/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Grid/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -57,7 +57,6 @@ namespace OpenSim.Grid.ScriptEngine.Common
57 LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r); 57 LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r);
58 LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end); 58 LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end);
59 void llWhisper(int channelID, string text); 59 void llWhisper(int channelID, string text);
60 //void llSay(int channelID, string text);
61 void llSay(int channelID, string text); 60 void llSay(int channelID, string text);
62 void llShout(int channelID, string text); 61 void llShout(int channelID, string text);
63 int llListen(int channelID, string name, string ID, string msg); 62 int llListen(int channelID, string name, string ID, string msg);
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
index 60f4d42..1db1446 100644
--- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
+++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
@@ -243,6 +243,11 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL
243 m_LSL_Functions.llShout(channelID, text); 243 m_LSL_Functions.llShout(channelID, text);
244 } 244 }
245 245
246 public void llOwnerSay(string msg)
247 {
248 m_LSL_Functions.llOwnerSay(msg);
249 }
250
246 public int llListen(int channelID, string name, string ID, string msg) 251 public int llListen(int channelID, string name, string ID, string msg)
247 { 252 {
248 return m_LSL_Functions.llListen(channelID, name, ID, msg); 253 return m_LSL_Functions.llListen(channelID, name, ID, msg);
@@ -1617,11 +1622,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL
1617 return m_LSL_Functions.llGetInventoryCreator(item); 1622 return m_LSL_Functions.llGetInventoryCreator(item);
1618 } 1623 }
1619 1624
1620 public void llOwnerSay(string msg)
1621 {
1622 m_LSL_Functions.llOwnerSay(msg);
1623 }
1624
1625 public void llRequestSimulatorData(string simulator, int data) 1625 public void llRequestSimulatorData(string simulator, int data)
1626 { 1626 {
1627 m_LSL_Functions.llRequestSimulatorData(simulator, data); 1627 m_LSL_Functions.llRequestSimulatorData(simulator, data);
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 64d3493..b06a457 100644
--- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -272,19 +272,30 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
272 public void llWhisper(int channelID, string text) 272 public void llWhisper(int channelID, string text)
273 { 273 {
274 World.SimChat(Helpers.StringToField(text), 274 World.SimChat(Helpers.StringToField(text),
275 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 275 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition,
276 m_host.Name, m_host.UUID, false);
276 } 277 }
277 278
278 public void llSay(int channelID, string text) 279 public void llSay(int channelID, string text)
279 { 280 {
280 World.SimChat(Helpers.StringToField(text), 281 World.SimChat(Helpers.StringToField(text),
281 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 282 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition,
283 m_host.Name, m_host.UUID, false);
282 } 284 }
283 285
284 public void llShout(int channelID, string text) 286 public void llShout(int channelID, string text)
285 { 287 {
286 World.SimChat(Helpers.StringToField(text), 288 World.SimChat(Helpers.StringToField(text),
287 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 289 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition,
290 m_host.Name, m_host.UUID, false);
291 }
292
293 public void llOwnerSay(string msg)
294 {
295 m_log.DebugFormat("llOwnerSay(\"{0}\")", msg);
296 World.SimChatBroadcast(Helpers.StringToField(text),
297 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
298 m_host.Name, m_host.UUID, false);
288 } 299 }
289 300
290 public int llListen(int channelID, string name, string ID, string msg) 301 public int llListen(int channelID, string name, string ID, string msg)
@@ -2032,11 +2043,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
2032 return ""; 2043 return "";
2033 } 2044 }
2034 2045
2035 public void llOwnerSay(string msg)
2036 {
2037 NotImplemented("llOwnerSay");
2038 }
2039
2040 public void llRequestSimulatorData(string simulator, int data) 2046 public void llRequestSimulatorData(string simulator, int data)
2041 { 2047 {
2042 NotImplemented("llRequestSimulatorData"); 2048 NotImplemented("llRequestSimulatorData");
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index e12588c..c3fc26e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
107 #region ISimChat Members 107 #region ISimChat Members
108 public void SimBroadcast(Object sender, ChatFromViewerArgs c) 108 public void SimBroadcast(Object sender, ChatFromViewerArgs c)
109 { 109 {
110 // We only want to relay stuff on channel 0 110 // We only want to relay stuff on channel 0 and on the debug channel
111 if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; 111 if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return;
112 112
113 if (c.Channel == DEBUG_CHANNEL) 113 if (c.Channel == DEBUG_CHANNEL)
@@ -118,13 +118,25 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
118 LLVector3 pos = new LLVector3(128, 128, 30); 118 LLVector3 pos = new LLVector3(128, 128, 30);
119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) 119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence)
120 { 120 {
121 if (!presence.IsChildAgent) return; 121 if (presence.IsChildAgent) return;
122
123 IClientAPI client = presence.ControllingClient;
124
125 if ((c.Type == ChatTypeEnum.Owner) &&
126 (null != c.SenderObject) &&
127 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
128 return;
122 129
123 presence.ControllingClient.SendChatMessage(c.Message, 130 if (null == c.SenderObject)
124 1, //255, 131 client.SendChatMessage(c.Message, (byte)c.Type,
125 pos, c.From, LLUUID.Zero, 132 pos, c.From, LLUUID.Zero,
126 c.Channel == DEBUG_CHANNEL? (byte)ChatSourceType.Object : (byte)ChatSourceType.Agent, 133 (byte)ChatSourceType.Agent,
127 (byte)ChatAudibleLevel.Fully); 134 (byte)ChatAudibleLevel.Fully);
135 else
136 client.SendChatMessage(c.Message, (byte)c.Type,
137 pos, c.From, LLUUID.Zero,
138 (byte)ChatSourceType.Object,
139 (byte)ChatAudibleLevel.Fully);
128 }); 140 });
129 } 141 }
130 142
@@ -147,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
147 159
148 string fromName = e.From; 160 string fromName = e.From;
149 string message = e.Message; 161 string message = e.Message;
150 LLUUID fromAgentID = e.SenderUUID; 162 LLUUID fromID = e.SenderUUID;
151 163
152 if (e.Sender != null) 164 if (e.Sender != null)
153 { 165 {
@@ -160,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
160 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 172 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
161 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 173 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
162 fromName = avatar.Firstname + " " + avatar.Lastname; 174 fromName = avatar.Firstname + " " + avatar.Lastname;
163 fromAgentID = e.Sender.AgentId; 175 fromID = e.Sender.AgentId;
164 } 176 }
165 177
166 if (e.Channel == DEBUG_CHANNEL) 178 if (e.Channel == DEBUG_CHANNEL)
@@ -175,13 +187,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
175 if (e.Channel == DEBUG_CHANNEL) 187 if (e.Channel == DEBUG_CHANNEL)
176 { 188 {
177 TrySendChatMessage(presence, fromPos, regionPos, 189 TrySendChatMessage(presence, fromPos, regionPos,
178 fromAgentID, fromName, e.Type, 190 fromID, fromName, e.Type,
179 message, ChatSourceType.Object); 191 message, ChatSourceType.Object);
180 } 192 }
181 else 193 else
182 { 194 {
183 TrySendChatMessage(presence, fromPos, regionPos, 195 TrySendChatMessage(presence, fromPos, regionPos,
184 fromAgentID, fromName, e.Type, 196 fromID, fromName, e.Type,
185 message, ChatSourceType.Agent); 197 message, ChatSourceType.Agent);
186 } 198 }
187 }); 199 });
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 18106be..452ea7b 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -88,6 +88,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
88 { 88 {
89 m_irc = new IRCChatModule(config); 89 m_irc = new IRCChatModule(config);
90 } 90 }
91
91 if (m_irc_connector == null) 92 if (m_irc_connector == null)
92 { 93 {
93 m_irc_connector = new Thread(IRCConnectRun); 94 m_irc_connector = new Thread(IRCConnectRun);
@@ -183,6 +184,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
183 m_irc_connector.Name = "IRCConnectorThread"; 184 m_irc_connector.Name = "IRCConnectorThread";
184 m_irc_connector.IsBackground = true; 185 m_irc_connector.IsBackground = true;
185 } 186 }
187
186 if (!m_irc_connector.IsAlive) 188 if (!m_irc_connector.IsAlive)
187 { 189 {
188 m_irc_connector.Start(); 190 m_irc_connector.Start();
@@ -196,20 +198,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
196 198
197 if (e.Message.StartsWith("/me ") && (null != avatar)) 199 if (e.Message.StartsWith("/me ") && (null != avatar))
198 e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4)); 200 e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4));
199 if (e.Channel == 0 || e.Channel == DEBUG_CHANNEL) 201
200 { 202 // this is to keep objects from talking to IRC
201 if (e.Channel == DEBUG_CHANNEL) 203 if (m_irc.Connected && (avatar != null))
202 e.Type = ChatTypeEnum.DebugChannel;
203
204 // IRC stuff
205 if (e.Message.Length > 0 && e.Channel == 0)
206 {
207 if (m_irc.Connected && (avatar != null)) // this is to keep objects from talking to IRC
208 {
209 m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); 204 m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message);
210 }
211 }
212 }
213 } 205 }
214 206
215 #endregion 207 #endregion
@@ -529,14 +521,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
529 // Get some direct matches $1 $4 is a 521 // Get some direct matches $1 $4 is a
530 if ((matches.Count == 0) || (matches.Count != 1) || (matches[0].Groups.Count != 5)) 522 if ((matches.Count == 0) || (matches.Count != 1) || (matches[0].Groups.Count != 5))
531 { 523 {
532 result = new Dictionary<string, string>();
533 result.Add("nick", matches[0].Groups[1].Value);
534 result.Add("user", matches[0].Groups[2].Value);
535 result.Add("channel", matches[0].Groups[3].Value);
536 result.Add("msg", matches[0].Groups[4].Value);
537 }
538 else
539 {
540 m_log.Info("[IRC]: Number of matches: " + matches.Count); 524 m_log.Info("[IRC]: Number of matches: " + matches.Count);
541 if (matches.Count > 0) 525 if (matches.Count > 0)
542 { 526 {
@@ -641,7 +625,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
641 625
642 public void BroadcastSim(string sender, string format, params string[] args) 626 public void BroadcastSim(string sender, string format, params string[] args)
643 { 627 {
644 LLVector3 pos = new LLVector3(128, 128, 20);
645 try 628 try
646 { 629 {
647 ChatFromViewerArgs c = new ChatFromViewerArgs(); 630 ChatFromViewerArgs c = new ChatFromViewerArgs();
@@ -781,8 +764,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
781 764
782 public void eventIrcMode(string[] commArgs) 765 public void eventIrcMode(string[] commArgs)
783 { 766 {
784 string IrcChannel = commArgs[2];
785 string IrcUser = commArgs[0].Split('!')[0];
786 string UserMode = ""; 767 string UserMode = "";
787 for (int i = 3; i < commArgs.Length; i++) 768 for (int i = 3; i < commArgs.Length; i++)
788 { 769 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 788e80a..8419399 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -34,16 +34,8 @@ namespace OpenSim.Region.Environment.Scenes
34{ 34{
35 public partial class Scene 35 public partial class Scene
36 { 36 {
37 /// <summary> 37 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
38 /// 38 LLUUID fromID, bool fromAgent, bool broadcast)
39 /// </summary>
40 /// <param name="message"></param>
41 /// <param name="type"></param>
42 /// <param name="fromPos"></param>
43 /// <param name="fromName"></param>
44 /// <param name="fromAgentID"></param>
45 public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
46 LLUUID fromAgentID)
47 { 39 {
48 ChatFromViewerArgs args = new ChatFromViewerArgs(); 40 ChatFromViewerArgs args = new ChatFromViewerArgs();
49 41
@@ -51,19 +43,56 @@ namespace OpenSim.Region.Environment.Scenes
51 args.Channel = channel; 43 args.Channel = channel;
52 args.Type = type; 44 args.Type = type;
53 args.Position = fromPos; 45 args.Position = fromPos;
54 args.SenderUUID = fromAgentID; 46 args.SenderUUID = fromID;
55 args.Scene = this; 47 args.Scene = this;
56 48
57 ScenePresence user = GetScenePresence(fromAgentID); 49 if (fromAgent)
58 if (user != null) 50 {
59 args.Sender = user.ControllingClient; 51 ScenePresence user = GetScenePresence(fromID);
52 if (user != null)
53 args.Sender = user.ControllingClient;
54 }
60 else 55 else
61 args.Sender = null; 56 {
57 SceneObjectPart obj = GetSceneObjectPart(fromID);
58 args.SenderObject = obj;
59 }
62 60
63 args.From = fromName; 61 args.From = fromName;
64 //args. 62 //args.
65 63
66 EventManager.TriggerOnChatFromWorld(this, args); 64 if (broadcast)
65 EventManager.TriggerOnChatBroadcast(this, args);
66 else
67 EventManager.TriggerOnChatFromWorld(this, args);
68
69 }
70 /// <summary>
71 ///
72 /// </summary>
73 /// <param name="message"></param>
74 /// <param name="type"></param>
75 /// <param name="fromPos"></param>
76 /// <param name="fromName"></param>
77 /// <param name="fromAgentID"></param>
78 public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
79 LLUUID fromID, bool fromAgent)
80 {
81 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
82 }
83
84 /// <summary>
85 ///
86 /// </summary>
87 /// <param name="message"></param>
88 /// <param name="type"></param>
89 /// <param name="fromPos"></param>
90 /// <param name="fromName"></param>
91 /// <param name="fromAgentID"></param>
92 public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
93 LLUUID fromID, bool fromAgent)
94 {
95 SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
67 } 96 }
68 97
69 /// <summary> 98 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f4ec1a3..4d380f9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -113,7 +113,6 @@ namespace OpenSim.Region.Environment.Scenes
113 public IXfer XferManager; 113 public IXfer XferManager;
114 114
115 protected IHttpRequests m_httpRequestModule; 115 protected IHttpRequests m_httpRequestModule;
116 protected ISimChat m_simChatModule;
117 protected IXMLRPC m_xmlrpcModule; 116 protected IXMLRPC m_xmlrpcModule;
118 protected IWorldComm m_worldCommModule; 117 protected IWorldComm m_worldCommModule;
119 protected IAvatarFactory m_AvatarFactory; 118 protected IAvatarFactory m_AvatarFactory;
@@ -637,7 +636,6 @@ namespace OpenSim.Region.Environment.Scenes
637 /// </summary> 636 /// </summary>
638 public void SetModuleInterfaces() 637 public void SetModuleInterfaces()
639 { 638 {
640 m_simChatModule = RequestModuleInterface<ISimChat>();
641 m_httpRequestModule = RequestModuleInterface<IHttpRequests>(); 639 m_httpRequestModule = RequestModuleInterface<IHttpRequests>();
642 m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); 640 m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
643 m_worldCommModule = RequestModuleInterface<IWorldComm>(); 641 m_worldCommModule = RequestModuleInterface<IWorldComm>();
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
index 2c33b57..07db853 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
@@ -285,6 +285,11 @@ namespace OpenSim.Region.ScriptEngine.Common
285 m_LSL_Functions.llShout(channelID, text); 285 m_LSL_Functions.llShout(channelID, text);
286 } 286 }
287 287
288 public void llOwnerSay(string msg)
289 {
290 m_LSL_Functions.llOwnerSay(msg);
291 }
292
288 public void llRegionSay(int channelID, string text) 293 public void llRegionSay(int channelID, string text)
289 { 294 {
290 m_LSL_Functions.llRegionSay(channelID, text); 295 m_LSL_Functions.llRegionSay(channelID, text);
@@ -1673,11 +1678,6 @@ namespace OpenSim.Region.ScriptEngine.Common
1673 return m_LSL_Functions.llGetInventoryCreator(item); 1678 return m_LSL_Functions.llGetInventoryCreator(item);
1674 } 1679 }
1675 1680
1676 public void llOwnerSay(string msg)
1677 {
1678 m_LSL_Functions.llOwnerSay(msg);
1679 }
1680
1681 public void llRequestSimulatorData(string simulator, int data) 1681 public void llRequestSimulatorData(string simulator, int data)
1682 { 1682 {
1683 m_LSL_Functions.llRequestSimulatorData(simulator, data); 1683 m_LSL_Functions.llRequestSimulatorData(simulator, data);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 9446844..efdf249 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.ScriptEngine.Common
50 /// </summary> 50 /// </summary>
51 public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface 51 public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface
52 { 52 {
53 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 53 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
54 54
55 internal ScriptEngineBase.ScriptEngine m_ScriptEngine; 55 internal ScriptEngineBase.ScriptEngine m_ScriptEngine;
56 internal SceneObjectPart m_host; 56 internal SceneObjectPart m_host;
@@ -409,7 +409,7 @@ namespace OpenSim.Region.ScriptEngine.Common
409 { 409 {
410 m_host.AddScriptLPS(1); 410 m_host.AddScriptLPS(1);
411 World.SimChat(Helpers.StringToField(text), 411 World.SimChat(Helpers.StringToField(text),
412 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 412 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
413 413
414 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 414 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
415 wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text); 415 wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
@@ -419,7 +419,7 @@ namespace OpenSim.Region.ScriptEngine.Common
419 { 419 {
420 m_host.AddScriptLPS(1); 420 m_host.AddScriptLPS(1);
421 World.SimChat(Helpers.StringToField(text), 421 World.SimChat(Helpers.StringToField(text),
422 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 422 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
423 423
424 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 424 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
425 wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text); 425 wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Common
429 { 429 {
430 m_host.AddScriptLPS(1); 430 m_host.AddScriptLPS(1);
431 World.SimChat(Helpers.StringToField(text), 431 World.SimChat(Helpers.StringToField(text),
432 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 432 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
433 433
434 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 434 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
435 wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text); 435 wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);
@@ -5478,15 +5478,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5478 5478
5479 public void llOwnerSay(string msg) 5479 public void llOwnerSay(string msg)
5480 { 5480 {
5481 //m_host.AddScriptLPS(1); // since we reuse llInstantMessage 5481 m_host.AddScriptLPS(1);
5482 //temp fix so that lsl wiki examples aren't annoying to use to test other functions 5482 World.SimChatBroadcast(Helpers.StringToField(msg),
5483 //should be similar to : llInstantMessage(llGetOwner(),msg) 5483 ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
5484 // llGetOwner ==> m_host.ObjectOwner.ToString() 5484 m_host.Name, m_host.UUID, false);
5485 llInstantMessage(m_host.ObjectOwner.ToString(),msg);
5486 5485
5487 //World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 5486 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
5488 //IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 5487 wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
5489 //wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
5490 } 5488 }
5491 5489
5492 public void llRequestSimulatorData(string simulator, int data) 5490 public void llRequestSimulatorData(string simulator, int data)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 6f266c3..64d6a75 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -333,7 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
333 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 333 m_ScriptEngine.World.SimChat(Helpers.StringToField(text),
334 ChatTypeEnum.DebugChannel, 2147483647, 334 ChatTypeEnum.DebugChannel, 2147483647,
335 m_host.AbsolutePosition, 335 m_host.AbsolutePosition,
336 m_host.Name, m_host.UUID); 336 m_host.Name, m_host.UUID, false);
337 } 337 }
338 catch (Exception) 338 catch (Exception)
339 { 339 {
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index bfa9951..087f688 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -140,8 +140,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
140 string text = "Error compiling script:\r\n" + e.Message.ToString(); 140 string text = "Error compiling script:\r\n" + e.Message.ToString();
141 if (text.Length > 1500) 141 if (text.Length > 1500)
142 text = text.Substring(0, 1500); 142 text = text.Substring(0, 1500);
143 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, m_host.AbsolutePosition, 143 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647,
144 m_host.Name, m_host.UUID); 144 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
145 } 145 }
146 catch (Exception e2) // LEGIT: User Scripting 146 catch (Exception e2) // LEGIT: User Scripting
147 { 147 {