diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index f8cfe448f7..17bd7959c7 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -1711,5 +1711,9 @@ namespace OpenSim.Client.MXP.ClientStack
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
index 3bf73d651d..b199b933d3 100644
--- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
+++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
@@ -1200,6 +1200,10 @@ namespace OpenSim.Client.Sirikata.ClientStack
{
}
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
+
#endregion
}
}
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index 894fdac832..1da746ad2b 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -1215,5 +1215,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
diff --git a/OpenSim/Data/MSSQL/MSSQLFriendsData.cs b/OpenSim/Data/MSSQL/MSSQLFriendsData.cs
index 34da943f7e..af4fd9ba55 100644
--- a/OpenSim/Data/MSSQL/MSSQLFriendsData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLFriendsData.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Data.MSSQL
using (SqlCommand cmd = new SqlCommand())
{
- cmd.CommandText = String.Format("select a.*,b.Flags as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = ?PrincipalID and b.Flags is not null", m_Realm);
+ cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = @PrincipalID", m_Realm);
cmd.Parameters.Add(m_database.CreateParameter("@PrincipalID", principalID.ToString()));
cmd.Connection = conn;
conn.Open();
diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
new file mode 100644
index 0000000000..b4a945c08e
--- /dev/null
+++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the OpenSimulator Project nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Reflection;
+using System.Threading;
+using log4net;
+using OpenMetaverse;
+using OpenSim.Framework;
+using System.Data.SqlClient;
+
+namespace OpenSim.Data.MSSQL
+{
+ ///
+ /// A MSSQL Interface for Avatar Storage
+ ///
+ public class MSSQLGridUserData : MSSQLGenericTableHandler,
+ IGridUserData
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ public MSSQLGridUserData(string connectionString, string realm) :
+ base(connectionString, realm, "UserGrid")
+ {
+ }
+
+ public GridUserData GetGridUserData(string userID)
+ {
+ GridUserData[] ret = Get("UserID", userID);
+
+ if (ret.Length == 0)
+ return null;
+
+ return ret[0];
+ }
+
+ public bool StoreGridUserData(GridUserData data)
+ {
+ return Store(data);
+ }
+ }
+}
diff --git a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql
index f6480f7193..94d240b512 100644
--- a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql
+++ b/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql
@@ -2,7 +2,7 @@ BEGIN TRANSACTION
CREATE TABLE [Friends] (
[PrincipalID] uniqueidentifier NOT NULL,
-[FriendID] varchar(255) NOT NULL,
+[Friend] varchar(255) NOT NULL,
[Flags] char(16) NOT NULL DEFAULT '0',
[Offered] varchar(32) NOT NULL DEFAULT 0)
ON [PRIMARY]
diff --git a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql
new file mode 100644
index 0000000000..3dbf8a4925
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql
@@ -0,0 +1,14 @@
+CREATE TABLE [UserAccounts] (
+ [PrincipalID] uniqueidentifier NOT NULL,
+ [ScopeID] uniqueidentifier NOT NULL,
+ [FirstName] [varchar](64) NOT NULL,
+ [LastName] [varchar](64) NOT NULL,
+ [Email] [varchar](64) NULL,
+ [ServiceURLs] [text] NULL,
+ [Created] [int] default NULL,
+
+ PRIMARY KEY CLUSTERED
+(
+ [PrincipalID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
diff --git a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
index 7762a26894..e67d20e4b7 100644
--- a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
+++ b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
@@ -1,6 +1,6 @@
BEGIN TRANSACTION
-INSERT INTO Friends (PrincipalID, FriendID, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
+INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
COMMIT
\ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql
new file mode 100644
index 0000000000..da0395b49c
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql
@@ -0,0 +1,9 @@
+BEGIN TRANSACTION
+
+CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
+CREATE INDEX Email ON UserAccounts(Email);
+CREATE INDEX FirstName ON UserAccounts(FirstName);
+CREATE INDEX LastName ON UserAccounts(LastName);
+CREATE INDEX Name ON UserAccounts(FirstName,LastName);
+
+COMMIT
\ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql
new file mode 100644
index 0000000000..a9a9021cc7
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql
@@ -0,0 +1,7 @@
+BEGIN TRANSACTION
+
+ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0;
+ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0;
+ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT '';
+
+COMMIT
\ No newline at end of file
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 3126e57330..4577758a34 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1480,5 +1480,6 @@ namespace OpenSim.Framework
void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt);
void SendChangeUserRights(UUID agentID, UUID friendID, int rights);
+ void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId);
}
}
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 27b3d478eb..86d63f88a8 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -91,6 +91,8 @@ namespace OpenSim.Framework
///
bool PresenceChildStatus(UUID agentId);
+ bool TryGetAvatar(UUID agentID, out object scenePresence);
+
T RequestModuleInterface();
T[] RequestModuleInterfaces();
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs
index 81d82bee5e..2fc5bdf163 100644
--- a/OpenSim/Framework/SLUtil.cs
+++ b/OpenSim/Framework/SLUtil.cs
@@ -59,6 +59,20 @@ namespace OpenSim.Framework
return "application/vnd.ll.gesture";
case AssetType.Simstate:
return "application/x-metaverse-simstate";
+ case AssetType.FavoriteFolder:
+ return "application/vnd.ll.favoritefolder";
+ case AssetType.Link:
+ return "application/vnd.ll.link";
+ case AssetType.LinkFolder:
+ return "application/vnd.ll.linkfolder";
+ case AssetType.CurrentOutfitFolder:
+ return "application/vnd.ll.currentoutfitfolder";
+ case AssetType.OutfitFolder:
+ return "application/vnd.ll.outfitfolder";
+ case AssetType.MyOutfitsFolder:
+ return "application/vnd.ll.myoutfitsfolder";
+ case AssetType.InboxFolder:
+ return "application/vnd.ll.inboxfolder";
case AssetType.Unknown:
default:
return "application/octet-stream";
@@ -123,6 +137,20 @@ namespace OpenSim.Framework
return (sbyte)AssetType.Gesture;
case "application/x-metaverse-simstate":
return (sbyte)AssetType.Simstate;
+ case "application/vnd.ll.favoritefolder":
+ return (sbyte)AssetType.FavoriteFolder;
+ case "application/vnd.ll.link":
+ return (sbyte)AssetType.Link;
+ case "application/vnd.ll.linkfolder":
+ return (sbyte)AssetType.LinkFolder;
+ case "application/vnd.ll.currentoutfitfolder":
+ return (sbyte)AssetType.CurrentOutfitFolder;
+ case "application/vnd.ll.outfitfolder":
+ return (sbyte)AssetType.OutfitFolder;
+ case "application/vnd.ll.myoutfitsfolder":
+ return (sbyte)AssetType.MyOutfitsFolder;
+ case "application/vnd.ll.inboxfolder":
+ return (sbyte)AssetType.InboxFolder;
case "application/octet-stream":
default:
return (sbyte)AssetType.Unknown;
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 0ccc193cb0..8cb9127230 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
+using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.IO.Compression;
@@ -1443,6 +1444,7 @@ namespace OpenSim.Framework
}
#endregion FireAndForget Threading Pattern
+
///
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
/// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
@@ -1467,5 +1469,21 @@ namespace OpenSim.Framework
Int32 diff = EnvironmentTickCount() - prevValue;
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
}
+
+ ///
+ /// Prints the call stack at any given point. Useful for debugging.
+ ///
+ public static void PrintCallStack()
+ {
+ StackTrace stackTrace = new StackTrace(); // get call stack
+ StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
+
+ // write call stack method names
+ foreach (StackFrame stackFrame in stackFrames)
+ {
+ m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name
+ }
+ }
+
}
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index ea73abb587..8cd47fb932 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -11621,5 +11621,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task);
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
+ dialog.Data.ObjectID = objectId;
+ dialog.Data.ChatChannel = chatChannel;
+ dialog.Data.ImageID = UUID.Zero;
+ dialog.Data.ObjectName = Util.StringToBytes256(objectname);
+ // this is the username of the *owner*
+ dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName);
+ dialog.Data.LastName = Util.StringToBytes256(ownerLastName);
+ dialog.Data.Message = Util.StringToBytes256(message);
+
+
+ ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1];
+ buttons[0] = new ScriptDialogPacket.ButtonsBlock();
+ buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!");
+ dialog.Buttons = buttons;
+ OutPacket(dialog, ThrottleOutPacketType.Task);
+ }
}
}
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 50c83b54a7..1386e86729 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
#region IRegionModule
+ private bool m_useCSJ2K = true;
+
public string Name { get { return "J2KDecoderModule"; } }
public bool IsSharedModule { get { return true; } }
@@ -73,6 +75,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
m_scene = scene;
scene.RegisterModuleInterface(this);
+
+ IConfig startupConfig = source.Configs["Startup"];
+ if (startupConfig != null)
+ {
+ m_useCSJ2K = startupConfig.GetBoolean("UseCSJ2K", m_useCSJ2K);
+ }
}
public void PostInitialise()
@@ -144,41 +152,52 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
/// JPEG2000 data
private void DoJ2KDecode(UUID assetID, byte[] j2kData)
{
-// int DecodeTime = 0;
-// DecodeTime = Environment.TickCount;
+ //int DecodeTime = 0;
+ //DecodeTime = Environment.TickCount;
OpenJPEG.J2KLayerInfo[] layers;
if (!TryLoadCacheForAsset(assetID, out layers))
{
- try
+ if (m_useCSJ2K)
{
- List layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(new MemoryStream(j2kData));
-
- if (layerStarts != null && layerStarts.Count > 0)
+ try
{
- layers = new OpenJPEG.J2KLayerInfo[layerStarts.Count];
+ List layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(new MemoryStream(j2kData));
- for (int i = 0; i < layerStarts.Count; i++)
+ if (layerStarts != null && layerStarts.Count > 0)
{
- OpenJPEG.J2KLayerInfo layer = new OpenJPEG.J2KLayerInfo();
+ layers = new OpenJPEG.J2KLayerInfo[layerStarts.Count];
- if (i == 0)
- layer.Start = 0;
- else
- layer.Start = layerStarts[i];
+ for (int i = 0; i < layerStarts.Count; i++)
+ {
+ OpenJPEG.J2KLayerInfo layer = new OpenJPEG.J2KLayerInfo();
- if (i == layerStarts.Count - 1)
- layer.End = j2kData.Length;
- else
- layer.End = layerStarts[i + 1] - 1;
+ if (i == 0)
+ layer.Start = 0;
+ else
+ layer.Start = layerStarts[i];
- layers[i] = layer;
+ if (i == layerStarts.Count - 1)
+ layer.End = j2kData.Length;
+ else
+ layer.End = layerStarts[i + 1] - 1;
+
+ layers[i] = layer;
+ }
}
}
+ catch (Exception ex)
+ {
+ m_log.Warn("[J2KDecoderModule]: CSJ2K threw an exception decoding texture " + assetID + ": " + ex.Message);
+ }
}
- catch (Exception ex)
+ else
{
- m_log.Warn("[J2KDecoderModule]: CSJ2K threw an exception decoding texture " + assetID + ": " + ex.Message);
+ int components;
+ if (!OpenJPEG.DecodeLayerBoundaries(j2kData, out layers, out components))
+ {
+ m_log.Warn("[J2KDecoderModule]: OpenJPEG failed to decode texture " + assetID);
+ }
}
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 fac052a7eb..b8e013c672 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
@@ -151,7 +152,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
// region as the sending avatar.
SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message);
}
-
+
+ public void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid)
+ {
+ UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid);
+ string ownerFirstName, ownerLastName;
+ if (account != null)
+ {
+ ownerFirstName = account.FirstName;
+ ownerLastName = account.LastName;
+ }
+ else
+ {
+ ownerFirstName = "(unknown";
+ ownerLastName = "user)";
+ }
+
+
+ ScenePresence sp = m_scene.GetScenePresence(avatarid);
+
+ if (sp != null) {
+ sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid);
+ }
+ }
+
public void SendNotificationToUsersInRegion(
UUID fromAvatarID, string fromAvatarName, string message)
{
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
index 4eff60ecdd..8a22cfc098 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
IConfig assetConfig = source.Configs["AssetService"];
if (assetConfig == null)
{
- m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini");
+ m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
return;
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
index 48759b57a5..d665a54a32 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
IConfig userConfig = source.Configs["AvatarService"];
if (userConfig == null)
{
- m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpanSim.ini");
+ m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini");
return;
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
index 891fc14750..e98df286fc 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
public void OnNewClient(IClientAPI client)
{
- client.OnLogout += OnLogout;
+ client.OnConnectionClosed += OnConnectionClose;
}
- public void OnLogout(IClientAPI client)
+ public void OnConnectionClose(IClientAPI client)
{
- client.OnLogout -= OnLogout;
-
- ScenePresence sp = null;
- Vector3 position = new Vector3(128, 128, 0);
- Vector3 lookat = new Vector3(0, 1, 0);
-
- if (m_aScene.TryGetAvatar(client.AgentId, out sp))
+ if (client.IsLoggingOut)
{
- position = sp.AbsolutePosition;
- lookat = sp.Lookat;
+ object sp = null;
+ Vector3 position = new Vector3(128, 128, 0);
+ Vector3 lookat = new Vector3(0, 1, 0);
+
+ if (client.Scene.TryGetAvatar(client.AgentId, out sp))
+ {
+ if (sp is ScenePresence)
+ {
+ position = ((ScenePresence)sp).AbsolutePosition;
+ lookat = ((ScenePresence)sp).Lookat;
+ }
+ }
+
+ m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
}
- m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
}
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index e913891625..783d606f64 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
//IConfig userConfig = config.Configs["SimulationService"];
//if (userConfig == null)
//{
- // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini");
+ // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
// return;
//}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 2b1f815cb9..4d82a05cee 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
//IConfig userConfig = config.Configs["SimulationService"];
//if (userConfig == null)
//{
- // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini");
+ // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
// return;
//}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index 13acdf2e5c..1140692830 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
IConfig userConfig = source.Configs["UserAccountService"];
if (userConfig == null)
{
- m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpanSim.ini");
+ m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpenSim.ini");
return;
}
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 4652d7020a..2211f3e4fa 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
if (IsFriendWithPerms(user, objectOwner))
return objectOwnerMask;
- // Estate users should be able to edit anything in the sim
- if (IsEstateManager(user) && m_RegionOwnerIsGod && (!IsAdministrator(objectOwner)) || objectOwner == user)
+ // Estate users should be able to edit anything in the sim if RegionOwnerIsGod is set
+ if (IsEstateManager(user) && m_RegionOwnerIsGod)
return objectOwnerMask;
// Admin should be able to edit anything in the sim (including admin objects)
if (IsAdministrator(user))
return objectOwnerMask;
-
+
// Users should be able to edit what is over their land.
- ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
+ Vector3 taskPos = task.AbsolutePosition;
+ ILandObject parcel = m_scene.LandChannel.GetLandObject(taskPos.X, taskPos.Y);
if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod)
{
// 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 c2753d9c0d..8d27f9cf29 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -1154,5 +1154,9 @@ namespace OpenSim.Region.Examples.SimpleModule
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
diff --git a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs
index ce57c44202..35b4b63152 100644
--- a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs
@@ -131,5 +131,10 @@ namespace OpenSim.Region.Framework.Interfaces
/// The name of the user doing the sending
/// The message being sent to the user
void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message);
+
+ ///
+ /// Send a textbox entry for the client to respond to
+ ///
+ void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid);
}
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 884f13ad32..d5d1825cbe 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4307,7 +4307,7 @@ namespace OpenSim.Region.Framework.Scenes
return m_sceneGraph.GetGroupByPrim(localID);
}
- public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
+ public override bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
{
return m_sceneGraph.TryGetAvatar(avatarId, out avatar);
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 4f6e824e9f..74476edd3e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -190,6 +190,21 @@ namespace OpenSim.Region.Framework.Scenes
///
public abstract void RemoveClient(UUID agentID);
+ public bool TryGetAvatar(UUID agentID, out object scenePresence)
+ {
+ scenePresence = null;
+ ScenePresence sp = null;
+ if (TryGetAvatar(agentID, out sp))
+ {
+ scenePresence = sp;
+ return true;
+ }
+
+ return false;
+ }
+
+ public abstract bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence);
+
#endregion
///
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneBaseTests.cs
index 8230f32c92..840039ca2a 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
{
throw new NotImplementedException();
}
+
+ public override bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence)
+ {
+ throw new NotImplementedException();
+ }
}
[Test]
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 711052c5ad..f5b148f69d 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
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index ebf9333aa5..338c04b271 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
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index aa2c8b337d..093cd0bebd 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
ScriptSleep(5000);
}
- public void llTextBox(string avatar, string message, int chat_channel)
+ public void llTextBox(string agent, string message, int chatChannel)
{
+ IDialogModule dm = World.RequestModuleInterface();
+
+ if (dm == null)
+ return;
+
m_host.AddScriptLPS(1);
- NotImplemented("llTextBox");
+ UUID av = new UUID();
+ if (!UUID.TryParse(agent,out av))
+ {
+ LSLError("First parameter to llDialog needs to be a key");
+ return;
+ }
+
+ if( message == string.Empty)
+ {
+ ShoutError("Trying to use llTextBox with empty message.");
+ }
+ else if (message.Length > 512)
+ {
+ ShoutError("Trying to use llTextBox with message over 512 characters.");
+ }
+ else
+ {
+ dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID);
+ ScriptSleep(1000);
+ }
}
public void llModifyLand(int action, int brush)
@@ -4219,6 +4243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llCollisionSound(string impact_sound, double impact_volume)
{
+
m_host.AddScriptLPS(1);
// TODO: Parameter check logic required.
UUID soundId = UUID.Zero;
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
index 6847852965..a5c157d7f2 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.Connectors
IConfig assetConfig = source.Configs["AssetService"];
if (assetConfig == null)
{
- m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini");
+ m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
throw new Exception("Asset connector init error");
}
diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
index f36fe5bed7..6f77a2d8b3 100644
--- a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Services.Connectors
IConfig assetConfig = source.Configs["AuthenticationService"];
if (assetConfig == null)
{
- m_log.Error("[AUTH CONNECTOR]: AuthenticationService missing from OpanSim.ini");
+ m_log.Error("[AUTH CONNECTOR]: AuthenticationService missing from OpenSim.ini");
throw new Exception("Authentication connector init error");
}
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
index 3309d169dd..9821dd40e2 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Services.Connectors
IConfig assetConfig = source.Configs["InventoryService"];
if (assetConfig == null)
{
- m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpanSim.ini");
+ m_log.Error("[INVENTORY CONNECTOR]: InventoryService missing from OpenSim.ini");
throw new Exception("Inventory connector init error");
}
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
index e1621b8a90..8e7c92b9ef 100644
--- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Services.Connectors
//sendData["SCOPEID"] = scopeID.ToString();
sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString();
- sendData["METHOD"] = "getagents";
+ sendData["METHOD"] = "getaccounts";
sendData["ScopeID"] = scopeID.ToString();
sendData["query"] = query;
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 1a3196589f..304538ab65 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -206,7 +206,7 @@ namespace OpenSim.Services.PresenceService
}
}
- m_log.DebugFormat("[PRESENCE SERVICE]: GetAgents for {0} userIDs found {1} presences", userIDs.Length, info.Count);
+ // m_log.DebugFormat("[PRESENCE SERVICE]: GetAgents for {0} userIDs found {1} presences", userIDs.Length, info.Count);
return info.ToArray();
}
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 715e1a43a6..f015db2c84 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1214,5 +1214,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{
}
+
+ public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
+ {
+ }
}
}
diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll
index f3244f6d8e..0e571d83f9 100644
Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll
index edbf3ce2bb..a35b5aea3f 100644
Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ
diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll
index 95d60217bd..c5efaf4baa 100644
Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 9adbf7cebc..1a6059fee9 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -257,6 +257,10 @@
; to be enabled from the console if this is set
; StartDisabled = false
+ ; Image decoding. Use CSJ2K for layer boundary decoding if true,
+ ; OpenJPEG if false
+ ; UseCSJ2K = true
+
[SMTP]
enabled=false
diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini
index ee84c81259..1d8e2efe72 100644
--- a/bin/config-include/StandaloneHypergrid.ini
+++ b/bin/config-include/StandaloneHypergrid.ini
@@ -18,7 +18,6 @@
InventoryAccessModule = "HGInventoryAccessModule"
InventoryServiceInConnector = true
AssetServiceInConnector = true
- HGAuthServiceInConnector = true
HypergridServiceInConnector = true
NeighbourServiceInConnector = true
LibraryModule = true
@@ -104,7 +103,6 @@
GridService = "OpenSim.Services.GridService.dll:GridService"
AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector"
SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
- WelcomeMessage = "Welcome, Avatar!"
[UserAgentService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"