Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-03-09 22:46:17 +00:00
commit 40873504dc
43 changed files with 351 additions and 55 deletions

View File

@ -1711,5 +1711,9 @@ namespace OpenSim.Client.MXP.ClientStack
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{ {
} }
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
} }
} }

View File

@ -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 #endregion
} }
} }

View File

@ -1215,5 +1215,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{ {
} }
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
} }
} }

View File

@ -72,7 +72,7 @@ namespace OpenSim.Data.MSSQL
using (SqlCommand cmd = new SqlCommand()) 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.Parameters.Add(m_database.CreateParameter("@PrincipalID", principalID.ToString()));
cmd.Connection = conn; cmd.Connection = conn;
conn.Open(); conn.Open();

View File

@ -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
{
/// <summary>
/// A MSSQL Interface for Avatar Storage
/// </summary>
public class MSSQLGridUserData : MSSQLGenericTableHandler<GridUserData>,
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);
}
}
}

View File

@ -2,7 +2,7 @@ BEGIN TRANSACTION
CREATE TABLE [Friends] ( CREATE TABLE [Friends] (
[PrincipalID] uniqueidentifier NOT NULL, [PrincipalID] uniqueidentifier NOT NULL,
[FriendID] varchar(255) NOT NULL, [Friend] varchar(255) NOT NULL,
[Flags] char(16) NOT NULL DEFAULT '0', [Flags] char(16) NOT NULL DEFAULT '0',
[Offered] varchar(32) NOT NULL DEFAULT 0) [Offered] varchar(32) NOT NULL DEFAULT 0)
ON [PRIMARY] ON [PRIMARY]

View File

@ -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]

View File

@ -1,6 +1,6 @@
BEGIN TRANSACTION 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 COMMIT

View File

@ -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

View File

@ -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

View File

@ -1480,5 +1480,6 @@ namespace OpenSim.Framework
void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt);
void SendChangeUserRights(UUID agentID, UUID friendID, int rights); void SendChangeUserRights(UUID agentID, UUID friendID, int rights);
void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId);
} }
} }

View File

@ -91,6 +91,8 @@ namespace OpenSim.Framework
/// </exception> /// </exception>
bool PresenceChildStatus(UUID agentId); bool PresenceChildStatus(UUID agentId);
bool TryGetAvatar(UUID agentID, out object scenePresence);
T RequestModuleInterface<T>(); T RequestModuleInterface<T>();
T[] RequestModuleInterfaces<T>(); T[] RequestModuleInterfaces<T>();

View File

@ -59,6 +59,20 @@ namespace OpenSim.Framework
return "application/vnd.ll.gesture"; return "application/vnd.ll.gesture";
case AssetType.Simstate: case AssetType.Simstate:
return "application/x-metaverse-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: case AssetType.Unknown:
default: default:
return "application/octet-stream"; return "application/octet-stream";
@ -123,6 +137,20 @@ namespace OpenSim.Framework
return (sbyte)AssetType.Gesture; return (sbyte)AssetType.Gesture;
case "application/x-metaverse-simstate": case "application/x-metaverse-simstate":
return (sbyte)AssetType.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": case "application/octet-stream":
default: default:
return (sbyte)AssetType.Unknown; return (sbyte)AssetType.Unknown;

View File

@ -29,6 +29,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Diagnostics;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;
@ -1443,6 +1444,7 @@ namespace OpenSim.Framework
} }
#endregion FireAndForget Threading Pattern #endregion FireAndForget Threading Pattern
/// <summary> /// <summary>
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive /// 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 /// 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; Int32 diff = EnvironmentTickCount() - prevValue;
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
} }
/// <summary>
/// Prints the call stack at any given point. Useful for debugging.
/// </summary>
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
}
}
} }
} }

View File

@ -11621,5 +11621,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task); 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);
}
} }
} }

View File

@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
#region IRegionModule #region IRegionModule
private bool m_useCSJ2K = true;
public string Name { get { return "J2KDecoderModule"; } } public string Name { get { return "J2KDecoderModule"; } }
public bool IsSharedModule { get { return true; } } public bool IsSharedModule { get { return true; } }
@ -73,6 +75,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
m_scene = scene; m_scene = scene;
scene.RegisterModuleInterface<IJ2KDecoder>(this); scene.RegisterModuleInterface<IJ2KDecoder>(this);
IConfig startupConfig = source.Configs["Startup"];
if (startupConfig != null)
{
m_useCSJ2K = startupConfig.GetBoolean("UseCSJ2K", m_useCSJ2K);
}
} }
public void PostInitialise() public void PostInitialise()
@ -144,11 +152,13 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
/// <param name="j2kData">JPEG2000 data</param> /// <param name="j2kData">JPEG2000 data</param>
private void DoJ2KDecode(UUID assetID, byte[] j2kData) private void DoJ2KDecode(UUID assetID, byte[] j2kData)
{ {
// int DecodeTime = 0; //int DecodeTime = 0;
// DecodeTime = Environment.TickCount; //DecodeTime = Environment.TickCount;
OpenJPEG.J2KLayerInfo[] layers; OpenJPEG.J2KLayerInfo[] layers;
if (!TryLoadCacheForAsset(assetID, out layers)) if (!TryLoadCacheForAsset(assetID, out layers))
{
if (m_useCSJ2K)
{ {
try try
{ {
@ -180,6 +190,15 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
{ {
m_log.Warn("[J2KDecoderModule]: CSJ2K threw an exception decoding texture " + assetID + ": " + ex.Message); m_log.Warn("[J2KDecoderModule]: CSJ2K threw an exception decoding texture " + assetID + ": " + ex.Message);
} }
}
else
{
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) if (layers == null || layers.Length == 0)
{ {

View File

@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
@ -152,6 +153,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
SendNotificationToUsersInRegion(fromAvatarID, fromAvatarName, message); 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( public void SendNotificationToUsersInRegion(
UUID fromAvatarID, string fromAvatarName, string message) UUID fromAvatarID, string fromAvatarName, string message)
{ {

View File

@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
IConfig assetConfig = source.Configs["AssetService"]; IConfig assetConfig = source.Configs["AssetService"];
if (assetConfig == null) if (assetConfig == null)
{ {
m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini"); m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
return; return;
} }

View File

@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
IConfig userConfig = source.Configs["AvatarService"]; IConfig userConfig = source.Configs["AvatarService"];
if (userConfig == null) if (userConfig == null)
{ {
m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpanSim.ini"); m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini");
return; return;
} }

View File

@ -77,23 +77,28 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public void OnNewClient(IClientAPI client) public void OnNewClient(IClientAPI client)
{ {
client.OnLogout += OnLogout; client.OnConnectionClosed += OnConnectionClose;
} }
public void OnLogout(IClientAPI client) public void OnConnectionClose(IClientAPI client)
{ {
client.OnLogout -= OnLogout; if (client.IsLoggingOut)
{
ScenePresence sp = null; object sp = null;
Vector3 position = new Vector3(128, 128, 0); Vector3 position = new Vector3(128, 128, 0);
Vector3 lookat = new Vector3(0, 1, 0); Vector3 lookat = new Vector3(0, 1, 0);
if (m_aScene.TryGetAvatar(client.AgentId, out sp)) if (client.Scene.TryGetAvatar(client.AgentId, out sp))
{ {
position = sp.AbsolutePosition; if (sp is ScenePresence)
lookat = sp.Lookat; {
position = ((ScenePresence)sp).AbsolutePosition;
lookat = ((ScenePresence)sp).Lookat;
} }
}
m_PresenceService.LogoutAgent(client.SessionId, position, lookat); m_PresenceService.LogoutAgent(client.SessionId, position, lookat);
}
} }
} }

View File

@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
//IConfig userConfig = config.Configs["SimulationService"]; //IConfig userConfig = config.Configs["SimulationService"];
//if (userConfig == null) //if (userConfig == null)
//{ //{
// m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini"); // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
// return; // return;
//} //}

View File

@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
//IConfig userConfig = config.Configs["SimulationService"]; //IConfig userConfig = config.Configs["SimulationService"];
//if (userConfig == null) //if (userConfig == null)
//{ //{
// m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpanSim.ini"); // m_log.Error("[AVATAR CONNECTOR]: SimulationService missing from OpenSim.ini");
// return; // return;
//} //}

View File

@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
IConfig userConfig = source.Configs["UserAccountService"]; IConfig userConfig = source.Configs["UserAccountService"];
if (userConfig == null) if (userConfig == null)
{ {
m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpanSim.ini"); m_log.Error("[USER CONNECTOR]: UserAccountService missing from OpenSim.ini");
return; return;
} }

View File

@ -609,8 +609,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (IsFriendWithPerms(user, objectOwner)) if (IsFriendWithPerms(user, objectOwner))
return objectOwnerMask; return objectOwnerMask;
// Estate users should be able to edit anything in the sim // Estate users should be able to edit anything in the sim if RegionOwnerIsGod is set
if (IsEstateManager(user) && m_RegionOwnerIsGod && (!IsAdministrator(objectOwner)) || objectOwner == user) if (IsEstateManager(user) && m_RegionOwnerIsGod)
return objectOwnerMask; return objectOwnerMask;
// Admin should be able to edit anything in the sim (including admin objects) // Admin should be able to edit anything in the sim (including admin objects)
@ -618,7 +618,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
return objectOwnerMask; return objectOwnerMask;
// Users should be able to edit what is over their land. // 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) if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod)
{ {
// Admin objects should not be editable by the above // Admin objects should not be editable by the above

View File

@ -1154,5 +1154,9 @@ namespace OpenSim.Region.Examples.SimpleModule
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{ {
} }
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
} }
} }

View File

@ -131,5 +131,10 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="fromAvatarName">The name of the user doing the sending</param> /// <param name="fromAvatarName">The name of the user doing the sending</param>
/// <param name="message">The message being sent to the user</param> /// <param name="message">The message being sent to the user</param>
void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message); void SendNotificationToUsersInEstate(UUID fromAvatarID, string fromAvatarName, string message);
/// <summary>
/// Send a textbox entry for the client to respond to
/// </summary>
void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid);
} }
} }

View File

@ -4307,7 +4307,7 @@ namespace OpenSim.Region.Framework.Scenes
return m_sceneGraph.GetGroupByPrim(localID); 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); return m_sceneGraph.TryGetAvatar(avatarId, out avatar);
} }

View File

@ -190,6 +190,21 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="agentID"></param> /// <param name="agentID"></param>
public abstract void RemoveClient(UUID agentID); 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 #endregion
/// <summary> /// <summary>

View File

@ -65,6 +65,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public override bool TryGetAvatar(UUID agentID, out ScenePresence scenePresence)
{
throw new NotImplementedException();
}
} }
[Test] [Test]

View File

@ -1680,5 +1680,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{ {
} }
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
} }
} }

View File

@ -1160,5 +1160,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{ {
} }
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
} }
} }

View File

@ -4201,10 +4201,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(5000); 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<IDialogModule>();
if (dm == null)
return;
m_host.AddScriptLPS(1); 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) 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) public void llCollisionSound(string impact_sound, double impact_volume)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
// TODO: Parameter check logic required. // TODO: Parameter check logic required.
UUID soundId = UUID.Zero; UUID soundId = UUID.Zero;

View File

@ -68,7 +68,7 @@ namespace OpenSim.Services.Connectors
IConfig assetConfig = source.Configs["AssetService"]; IConfig assetConfig = source.Configs["AssetService"];
if (assetConfig == null) 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"); throw new Exception("Asset connector init error");
} }

View File

@ -67,7 +67,7 @@ namespace OpenSim.Services.Connectors
IConfig assetConfig = source.Configs["AuthenticationService"]; IConfig assetConfig = source.Configs["AuthenticationService"];
if (assetConfig == null) 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"); throw new Exception("Authentication connector init error");
} }

View File

@ -68,7 +68,7 @@ namespace OpenSim.Services.Connectors
IConfig assetConfig = source.Configs["InventoryService"]; IConfig assetConfig = source.Configs["InventoryService"];
if (assetConfig == null) 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"); throw new Exception("Inventory connector init error");
} }

View File

@ -131,7 +131,7 @@ namespace OpenSim.Services.Connectors
//sendData["SCOPEID"] = scopeID.ToString(); //sendData["SCOPEID"] = scopeID.ToString();
sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString();
sendData["METHOD"] = "getagents"; sendData["METHOD"] = "getaccounts";
sendData["ScopeID"] = scopeID.ToString(); sendData["ScopeID"] = scopeID.ToString();
sendData["query"] = query; sendData["query"] = query;

View File

@ -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(); return info.ToArray();
} }

View File

@ -1214,5 +1214,9 @@ namespace OpenSim.Tests.Common.Mock
public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
{ {
} }
public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
{
}
} }
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -257,6 +257,10 @@
; to be enabled from the console if this is set ; to be enabled from the console if this is set
; StartDisabled = false ; StartDisabled = false
; Image decoding. Use CSJ2K for layer boundary decoding if true,
; OpenJPEG if false
; UseCSJ2K = true
[SMTP] [SMTP]
enabled=false enabled=false

View File

@ -18,7 +18,6 @@
InventoryAccessModule = "HGInventoryAccessModule" InventoryAccessModule = "HGInventoryAccessModule"
InventoryServiceInConnector = true InventoryServiceInConnector = true
AssetServiceInConnector = true AssetServiceInConnector = true
HGAuthServiceInConnector = true
HypergridServiceInConnector = true HypergridServiceInConnector = true
NeighbourServiceInConnector = true NeighbourServiceInConnector = true
LibraryModule = true LibraryModule = true
@ -104,7 +103,6 @@
GridService = "OpenSim.Services.GridService.dll:GridService" GridService = "OpenSim.Services.GridService.dll:GridService"
AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector" AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector"
SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
WelcomeMessage = "Welcome, Avatar!"
[UserAgentService] [UserAgentService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService" LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"