aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs54
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs5
4 files changed, 90 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index bb82fd4..2ed8fbf 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -974,6 +974,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
974 // TODO 974 // TODO
975 } 975 }
976 976
977 public void SendGenericMessage(string method, List<string> message)
978 {
979
980 }
981
977 public void SendGenericMessage(string method, List<byte[]> message) 982 public void SendGenericMessage(string method, List<byte[]> message)
978 { 983 {
979 984
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index 30580e7..e189489 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -98,6 +98,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
98 String Description { get; set; } 98 String Description { get; set; }
99 99
100 /// <summary> 100 /// <summary>
101 /// Returns the UUID of the Owner of the Object.
102 /// </summary>
103 UUID OwnerId { get; }
104
105 /// <summary>
106 /// Returns the UUID of the Creator of the Object.
107 /// </summary>
108 UUID CreatorId { get; }
109
110 /// <summary>
101 /// Returns the root object of a linkset. If this object is the root, it will return itself. 111 /// Returns the root object of a linkset. If this object is the root, it will return itself.
102 /// </summary> 112 /// </summary>
103 IObject Root { get; } 113 IObject Root { get; }
@@ -179,9 +189,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
179 /// </summary> 189 /// </summary>
180 /// <param name="msg">The message to send to the user</param> 190 /// <param name="msg">The message to send to the user</param>
181 void Say(string msg); 191 void Say(string msg);
182 192
193 /// <summary>
194 /// Causes the object to speak to on a specific channel,
195 /// equivilent to LSL/OSSL llSay
196 /// </summary>
197 /// <param name="msg">The message to send to the user</param>
198 /// <param name="channel">The channel on which to send the message</param>
183 void Say(string msg,int channel); 199 void Say(string msg,int channel);
184 200
201 /// <summary>
202 /// Opens a Dialog Panel in the Users Viewer,
203 /// equivilent to LSL/OSSL llDialog
204 /// </summary>
205 /// <param name="avatar">The UUID of the Avatar to which the Dialog should be send</param>
206 /// <param name="message">The Message to display at the top of the Dialog</param>
207 /// <param name="buttons">The Strings that act as label/value of the Bottons in the Dialog</param>
208 /// <param name="chat_channel">The channel on which to send the response</param>
209 void Dialog(UUID avatar, string message, string[] buttons, int chat_channel);
210
185 //// <value> 211 //// <value>
186 /// Grants access to the objects inventory 212 /// Grants access to the objects inventory
187 /// </value> 213 /// </value>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 5bfe4be..96cccb7 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -31,6 +31,7 @@ using System.Security;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenMetaverse.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
35using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; 36using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object;
36using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
@@ -169,6 +170,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
169 } 170 }
170 } 171 }
171 172
173 public UUID OwnerId
174 {
175 get { return GetSOP().OwnerID;}
176 }
177
178 public UUID CreatorId
179 {
180 get { return GetSOP().CreatorID;}
181 }
182
172 public IObject[] Children 183 public IObject[] Children
173 { 184 {
174 get 185 get
@@ -392,7 +403,48 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
392 SceneObjectPart sop = GetSOP(); 403 SceneObjectPart sop = GetSOP();
393 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); 404 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false);
394 } 405 }
395 406
407 public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel)
408 {
409 if (!CanEdit())
410 return;
411
412 IDialogModule dm = m_rootScene.RequestModuleInterface<IDialogModule>();
413
414 if (dm == null)
415 return;
416
417 if (buttons.Length < 1)
418 {
419 Say("ERROR: No less than 1 button can be shown",2147483647);
420 return;
421 }
422 if (buttons.Length > 12)
423 {
424 Say("ERROR: No more than 12 buttons can be shown",2147483647);
425 return;
426 }
427
428 foreach(string button in buttons)
429 {
430 if (button == String.Empty)
431 {
432 Say("ERROR: button label cannot be blank",2147483647);
433 return;
434 }
435 if (button.Length > 24)
436 {
437 Say("ERROR: button label cannot be longer than 24 characters",2147483647);
438 return;
439 }
440 }
441
442 dm.SendDialogToUser(
443 avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID,
444 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons);
445
446 }
447
396 #endregion 448 #endregion
397 449
398 450
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 9f6a33a..e43ef78 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -551,6 +551,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
551 551
552 } 552 }
553 553
554 public void SendGenericMessage(string method, List<string> message)
555 {
556
557 }
558
554 public void SendGenericMessage(string method, List<byte[]> message) 559 public void SendGenericMessage(string method, List<byte[]> message)
555 { 560 {
556 561