aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2009-12-23 10:34:11 -0800
committerCharles Krinke2009-12-23 10:34:11 -0800
commitfddefff28479b6874235419dd5d26214afabb4f2 (patch)
tree056b131e7b7afd25f7b1ccc96e5871dba30877a8 /OpenSim
parent- commented out unused method ConvertIHttpClientContextToOSHttp (diff)
downloadopensim-SC_OLD-fddefff28479b6874235419dd5d26214afabb4f2.zip
opensim-SC_OLD-fddefff28479b6874235419dd5d26214afabb4f2.tar.gz
opensim-SC_OLD-fddefff28479b6874235419dd5d26214afabb4f2.tar.bz2
opensim-SC_OLD-fddefff28479b6874235419dd5d26214afabb4f2.tar.xz
Thank you kindly, Ziah for a patch that adds the channel to the class ChatEventArgs and retrieves it's value along with the others from the OSChatMessage in HandleChatPackage. With this the MRM Script can check if a ChatEvent is coming in on a specifc Channel. The Second Part adds the Method say(string msg , int channel) to send a chat message on the specified channel. The idea behind this is to enable MRM's to communicate with regular LSL or OSSL Scripts so that they may can act as a Backend to access a Database or do business Logic for those Scripts.
Signed-off-by: Charles Krinke <cfk@pacbell.net>
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs9
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs6
4 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index 19f7210..9d64667 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -179,6 +179,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
179 /// </summary> 179 /// </summary>
180 /// <param name="msg">The message to send to the user</param> 180 /// <param name="msg">The message to send to the user</param>
181 void Say(string msg); 181 void Say(string msg);
182
183 void Say(string msg,int channel);
182 184
183 //// <value> 185 //// <value>
184 /// Grants access to the objects inventory 186 /// Grants access to the objects inventory
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
index 3c14ed5..3b3b3d0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
@@ -41,6 +41,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
41 { 41 {
42 public string Text; 42 public string Text;
43 public IEntity Sender; 43 public IEntity Sender;
44 public int Channel;
44 } 45 }
45 46
46 public delegate void OnChatDelegate(IWorld sender, ChatEventArgs e); 47 public delegate void OnChatDelegate(IWorld sender, ChatEventArgs e);
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 143c454..9596d13 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -384,6 +384,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
384 m_rootScene.SimChat(msg, ChatTypeEnum.Say, sop.AbsolutePosition, sop.Name, sop.UUID, false); 384 m_rootScene.SimChat(msg, ChatTypeEnum.Say, sop.AbsolutePosition, sop.Name, sop.UUID, false);
385 } 385 }
386 386
387 public void Say(string msg,int channel)
388 {
389 if (!CanEdit())
390 return;
391
392 SceneObjectPart sop = GetSOP();
393 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false);
394 }
395
387 #endregion 396 #endregion
388 397
389 398
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
index 6fcb5d0..82020cb 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -148,7 +148,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
148 ChatEventArgs e = new ChatEventArgs(); 148 ChatEventArgs e = new ChatEventArgs();
149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security); 149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security);
150 e.Text = chat.Message; 150 e.Text = chat.Message;
151 151 e.Channel = chat.Channel;
152
152 _OnChat(this, e); 153 _OnChat(this, e);
153 return; 154 return;
154 } 155 }
@@ -158,7 +159,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
158 ChatEventArgs e = new ChatEventArgs(); 159 ChatEventArgs e = new ChatEventArgs();
159 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); 160 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security);
160 e.Text = chat.Message; 161 e.Text = chat.Message;
161 162 e.Channel = chat.Channel;
163
162 _OnChat(this, e); 164 _OnChat(this, e);
163 return; 165 return;
164 } 166 }