aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-03-09 22:46:17 +0000
committerMelanie2010-03-09 22:46:17 +0000
commit40873504dcde19a3738cf4d3a4928a59b811e8f0 (patch)
tree605d2c2575e21496b05eeabd0a5755b8fa788efd /OpenSim/Region
parent- parcel blocking, region crossing blocking, teleport blocking (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-40873504dcde19a3738cf4d3a4928a59b811e8f0.zip
opensim-SC-40873504dcde19a3738cf4d3a4928a59b811e8f0.tar.gz
opensim-SC-40873504dcde19a3738cf4d3a4928a59b811e8f0.tar.bz2
opensim-SC-40873504dcde19a3738cf4d3a4928a59b811e8f0.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs20
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs59
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs26
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs29
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs9
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDialogModule.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs29
18 files changed, 176 insertions, 45 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index ea73abb..8cd47fb 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -11621,5 +11621,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11621 11621
11622 OutPacket(packet, ThrottleOutPacketType.Task); 11622 OutPacket(packet, ThrottleOutPacketType.Task);
11623 } 11623 }
11624
11625 public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
11626 {
11627 ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
11628 dialog.Data.ObjectID = objectId;
11629 dialog.Data.ChatChannel = chatChannel;
11630 dialog.Data.ImageID = UUID.Zero;
11631 dialog.Data.ObjectName = Util.StringToBytes256(objectname);
11632 // this is the username of the *owner*
11633 dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName);
11634 dialog.Data.LastName = Util.StringToBytes256(ownerLastName);
11635 dialog.Data.Message = Util.StringToBytes256(message);
11636
11637
11638 ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1];
11639 buttons[0] = new ScriptDialogPacket.ButtonsBlock();
11640 buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!");
11641 dialog.Buttons = buttons;
11642 OutPacket(dialog, ThrottleOutPacketType.Task);
11643 }
11624 } 11644 }
11625} 11645}
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 50c83b5..1386e86 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
60 60
61 #region IRegionModule 61 #region IRegionModule
62 62
63 private bool m_useCSJ2K = true;
64
63 public string Name { get { return "J2KDecoderModule"; } } 65 public string Name { get { return "J2KDecoderModule"; } }
64 public bool IsSharedModule { get { return true; } } 66 public bool IsSharedModule { get { return true; } }
65 67
@@ -73,6 +75,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
73 m_scene = scene; 75 m_scene = scene;
74 76
75 scene.RegisterModuleInterface<IJ2KDecoder>(this); 77 scene.RegisterModuleInterface<IJ2KDecoder>(this);
78
79 IConfig startupConfig = source.Configs["Startup"];
80 if (startupConfig != null)
81 {
82 m_useCSJ2K = startupConfig.GetBoolean("UseCSJ2K", m_useCSJ2K);
83 }
76 } 84 }
77 85
78 public void PostInitialise() 86 public void PostInitialise()
@@ -144,41 +152,52 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
144 /// <param name="j2kData">JPEG2000 data</param> 152 /// <param name="j2kData">JPEG2000 data</param>
145 private void DoJ2KDecode(UUID assetID, byte[] j2kData) 153 private void DoJ2KDecode(UUID assetID, byte[] j2kData)
146 { 154 {
147// int DecodeTime = 0; 155 //int DecodeTime = 0;
148// DecodeTime = Environment.TickCount; 156 //DecodeTime = Environment.TickCount;
149 OpenJPEG.J2KLayerInfo[] layers; 157 OpenJPEG.J2KLayerInfo[] layers;
150 158
151 if (!TryLoadCacheForAsset(assetID, out layers)) 159 if (!TryLoadCacheForAsset(assetID, out layers))
152 { 160 {
153 try 161 if (m_useCSJ2K)
154 { 162 {
155 List<int> layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(new MemoryStream(j2kData)); 163 try
156
157 if (layerStarts != null && layerStarts.Count > 0)
158 { 164 {
159 layers = new OpenJPEG.J2KLayerInfo[layerStarts.Count]; 165 List<int> layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(new MemoryStream(j2kData));
160 166
161 for (int i = 0; i < layerStarts.Count; i++) 167 if (layerStarts != null && layerStarts.Count > 0)
162 { 168 {
163 OpenJPEG.J2KLayerInfo layer = new OpenJPEG.J2KLayerInfo(); 169 layers = new OpenJPEG.J2KLayerInfo[layerStarts.Count];
170
171 for (int i = 0; i < layerStarts.Count; i++)
172 {
173 OpenJPEG.J2KLayerInfo layer = new OpenJPEG.J2KLayerInfo();
164 174
165 if (i == 0) 175 if (i == 0)
166 layer.Start = 0; 176 layer.Start = 0;
167 else 177 else
168 layer.Start = layerStarts[i]; 178 layer.Start = layerStarts[i];
169 179
170 if (i == layerStarts.Count - 1) 180 if (i == layerStarts.Count - 1)
171 layer.End = j2kData.Length; 181 layer.End = j2kData.Length;
172 else 182 else
173 layer.End = layerStarts[i + 1] - 1; 183 layer.End = layerStarts[i + 1] - 1;
174 184
175 layers[i] = layer; 185 layers[i] = layer;
186 }
176 } 187 }
177 } 188 }
189 catch (Exception ex)
190 {
191 m_log.Warn("[J2KDecoderModule]: CSJ2K threw an exception decoding texture " + assetID + ": " + ex.Message);
192 }
178 } 193 }
179 catch (Exception ex) 194 else
180 { 195 {
181 m_log.Warn("[J2KDecoderModule]: CSJ2K threw an exception decoding texture " + assetID + ": " + ex.Message); 196 int components;
197 if (!OpenJPEG.DecodeLayerBoundaries(j2kData, out layers, out components))
198 {
199 m_log.Warn("[J2KDecoderModule]: OpenJPEG failed to decode texture " + assetID);
200 }
182 } 201 }
183 202
184 if (layers == null || layers.Length == 0) 203 if (layers == null || layers.Length == 0)
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index fac052a..b8e013c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -25,6 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Collections.Generic; 29using System.Collections.Generic;
29using System.Reflection; 30using System.Reflection;
30using log4net; 31using log4net;
@@ -151,7 +152,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
151 // region as the sending avatar. 152 // region as the sending avatar.
152 SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message); 153 SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message);
153 } 154 }
154 155
156 public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid)
157 {
158 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid);
159 string ownerFirstName, ownerLastName;
160 if (account != null)
161 {
162 ownerFirstName = account.FirstName;
163 ownerLastName = account.LastName;
164 }
165 else
166 {
167 ownerFirstName = "(unknown";
168 ownerLastName = "user)";
169 }
170
171
172 ScenePresence sp = m_scene.GetScenePresence(avatarid);
173
174 if (sp != null) {
175 sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid);
176 }
177 }
178
155 public void SendNotificationToUsersInRegion( 179 public void SendNotificationToUsersInRegion(
156 UUID fromAvatarID, string fromAvatarName, string message) 180 UUID fromAvatarID, string fromAvatarName, string message)
157 { 181 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
index 4eff60e..8a22cfc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
69 IConfig assetConfig = source.Configs["AssetService"]; 69 IConfig assetConfig = source.Configs["AssetService"];
70 if (assetConfig == null) 70 if (assetConfig == null)
71 { 71 {
72 m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini"); 72 m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
73 return; 73 return;
74 } 74 }
75 75
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
index 48759b5..d665a54 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
66 IConfig userConfig = source.Configs["AvatarService"]; 66 IConfig userConfig = source.Configs["AvatarService"];
67 if (userConfig == null) 67 if (userConfig == null)
68 { 68 {
69 m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpanSim.ini"); 69 m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini");
70 return; 70 return;
71 } 71 }
72 72
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
index 891fc14..e98df28 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
@@ -77,23 +77,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
77 77
78 public void OnNewClient(IClientAPI client) 78 public void OnNewClient(IClientAPI client)
79 { 79 {
80 client.OnLogout += OnLogout; 80 client.OnConnectionClosed += OnConnectionClose;
81 } 81 }
82 82
83 public void OnLogout(IClientAPI client) 83 public void OnConnectionClose(IClientAPI client)
84 { 84 {
85 client.OnLogout -= OnLogout; 85 if (client.IsLoggingOut)
86
87 ScenePresence sp = null;
88 Vector3 position = new Vector3(128, 128, 0);
89 Vector3 lookat = new Vector3(0, 1, 0);
90
91 if (m_aScene.TryGetAvatar(client.AgentId, out sp))
92 { 86 {
93 position = sp.AbsolutePosition; 87 object sp = null;
94 lookat = sp.Lookat; 88 Vector3 position = new Vector3(128, 128, 0);
89 Vector3 lookat = new Vector3(0, 1, 0);
90
91 if (client.Scene.TryGetAvatar(client.AgentId, out sp))
92 {
93 if (sp is ScenePresence)
94 {
95 position = ((ScenePresence)sp).AbsolutePosition;
96 lookat = ((ScenePresence)sp).Lookat;
97 }
98 }
99
100 m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
95 } 101 }
96 m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
97 102
98 } 103 }
99 } 104 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index e913891..783d606 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
69 //IConfig userConfig = config.Configs["SimulationService"]; 69 //IConfig userConfig = config.Configs["SimulationService"];
70 //if (userConfig == null) 70 //if (userConfig == null)
71 //{ 71 //{
72 // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini"); 72 // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
73 // return; 73 // return;
74 //} 74 //}
75 75
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 2b1f815..4d82a05 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
74 //IConfig userConfig = config.Configs["SimulationService"]; 74 //IConfig userConfig = config.Configs["SimulationService"];
75 //if (userConfig == null) 75 //if (userConfig == null)
76 //{ 76 //{
77 // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini"); 77 // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
78 // return; 78 // return;
79 //} 79 //}
80 80
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index 13acdf2..1140692 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
69 IConfig userConfig = source.Configs["UserAccountService"]; 69 IConfig userConfig = source.Configs["UserAccountService"];
70 if (userConfig == null) 70 if (userConfig == null)
71 { 71 {
72 m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpanSim.ini"); 72 m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpenSim.ini");
73 return; 73 return;
74 } 74 }
75 75
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 4652d70..2211f3e 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -609,16 +609,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
609 if (IsFriendWithPerms(user, objectOwner)) 609 if (IsFriendWithPerms(user, objectOwner))
610 return objectOwnerMask; 610 return objectOwnerMask;
611 611
612 // Estate users should be able to edit anything in the sim 612 // Estate users should be able to edit anything in the sim if RegionOwnerIsGod is set
613 if (IsEstateManager(user) && m_RegionOwnerIsGod && (!IsAdministrator(objectOwner)) || objectOwner == user) 613 if (IsEstateManager(user) && m_RegionOwnerIsGod)
614 return objectOwnerMask; 614 return objectOwnerMask;
615 615
616 // Admin should be able to edit anything in the sim (including admin objects) 616 // Admin should be able to edit anything in the sim (including admin objects)
617 if (IsAdministrator(user)) 617 if (IsAdministrator(user))
618 return objectOwnerMask; 618 return objectOwnerMask;
619 619
620 // Users should be able to edit what is over their land. 620 // Users should be able to edit what is over their land.
621 ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); 621 Vector3 taskPos = task.AbsolutePosition;
622 ILandObject parcel = m_scene.LandChannel.GetLandObject(taskPos.X, taskPos.Y);
622 if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod) 623 if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod)
623 { 624 {
624 // Admin objects should not be editable by the above 625 // Admin objects should not be editable by the above
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index c2753d9..8d27f9c 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -1154,5 +1154,9 @@ namespace OpenSim.Region.Examples.SimpleModule
1154 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) 1154 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
1155 { 1155 {
1156 } 1156 }
1157
1158 public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
1159 {
1160 }
1157 } 1161 }
1158} 1162}
diff --git a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs
index ce57c44..35b4b63 100644
--- a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs
@@ -131,5 +131,10 @@ namespace OpenSim.Region.Framework.Interfaces
131 /// <param name="fromAvatarName">The name of the user doing the sending</param> 131 /// <param name="fromAvatarName">The name of the user doing the sending</param>
132 /// <param name="message">The message being sent to the user</param> 132 /// <param name="message">The message being sent to the user</param>
133 void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message); 133 void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message);
134
135 /// <summary>
136 /// Send a textbox entry for the client to respond to
137 /// </summary>
138 void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid);
134 } 139 }
135} 140}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 884f13a..d5d1825 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4307,7 +4307,7 @@ namespace OpenSim.Region.Framework.Scenes
4307 return m_sceneGraph.GetGroupByPrim(localID); 4307 return m_sceneGraph.GetGroupByPrim(localID);
4308 } 4308 }
4309 4309
4310 public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) 4310 public override bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
4311 { 4311 {
4312 return m_sceneGraph.TryGetAvatar(avatarId, out avatar); 4312 return m_sceneGraph.TryGetAvatar(avatarId, out avatar);
4313 } 4313 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 4f6e824..74476ed 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -190,6 +190,21 @@ namespace OpenSim.Region.Framework.Scenes
190 /// <param name="agentID"></param> 190 /// <param name="agentID"></param>
191 public abstract void RemoveClient(UUID agentID); 191 public abstract void RemoveClient(UUID agentID);
192 192
193 public bool TryGetAvatar(UUID agentID, out object scenePresence)
194 {
195 scenePresence = null;
196 ScenePresence sp = null;
197 if (TryGetAvatar(agentID, out sp))
198 {
199 scenePresence = sp;
200 return true;
201 }
202
203 return false;
204 }
205
206 public abstract bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence);
207
193 #endregion 208 #endregion
194 209
195 /// <summary> 210 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
index 8230f32..840039c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
@@ -65,6 +65,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
65 { 65 {
66 throw new NotImplementedException(); 66 throw new NotImplementedException();
67 } 67 }
68
69 public override bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence)
70 {
71 throw new NotImplementedException();
72 }
68 } 73 }
69 74
70 [Test] 75 [Test]
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 711052c..f5b148f 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1680,5 +1680,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1680 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) 1680 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
1681 { 1681 {
1682 } 1682 }
1683
1684 public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
1685 {
1686 }
1683 } 1687 }
1684} 1688}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index ebf9333..338c04b 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -1160,5 +1160,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1160 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) 1160 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
1161 { 1161 {
1162 } 1162 }
1163
1164 public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
1165 {
1166 }
1163 } 1167 }
1164} 1168}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index aa2c8b3..093cd0b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4201,10 +4201,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4201 ScriptSleep(5000); 4201 ScriptSleep(5000);
4202 } 4202 }
4203 4203
4204 public void llTextBox(string avatar, string message, int chat_channel) 4204 public void llTextBox(string agent, string message, int chatChannel)
4205 { 4205 {
4206 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
4207
4208 if (dm == null)
4209 return;
4210
4206 m_host.AddScriptLPS(1); 4211 m_host.AddScriptLPS(1);
4207 NotImplemented("llTextBox"); 4212 UUID av = new UUID();
4213 if (!UUID.TryParse(agent,out av))
4214 {
4215 LSLError("First parameter to llDialog needs to be a key");
4216 return;
4217 }
4218
4219 if( message == string.Empty)
4220 {
4221 ShoutError("Trying to use llTextBox with empty message.");
4222 }
4223 else if (message.Length > 512)
4224 {
4225 ShoutError("Trying to use llTextBox with message over 512 characters.");
4226 }
4227 else
4228 {
4229 dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID);
4230 ScriptSleep(1000);
4231 }
4208 } 4232 }
4209 4233
4210 public void llModifyLand(int action, int brush) 4234 public void llModifyLand(int action, int brush)
@@ -4219,6 +4243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4219 4243
4220 public void llCollisionSound(string impact_sound, double impact_volume) 4244 public void llCollisionSound(string impact_sound, double impact_volume)
4221 { 4245 {
4246
4222 m_host.AddScriptLPS(1); 4247 m_host.AddScriptLPS(1);
4223 // TODO: Parameter check logic required. 4248 // TODO: Parameter check logic required.
4224 UUID soundId = UUID.Zero; 4249 UUID soundId = UUID.Zero;