Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
b18ca2fee6
|
@ -598,6 +598,7 @@ namespace OpenSim.Client.MXP.ClientStack
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
public event GenericCall2 OnRequestWearables;
|
public event GenericCall2 OnRequestWearables;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
|
|
@ -244,6 +244,7 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
public event GenericCall2 OnRequestWearables;
|
public event GenericCall2 OnRequestWearables;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
|
|
@ -247,6 +247,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply = delegate { };
|
public event Action<IClientAPI> OnRegionHandShakeReply = delegate { };
|
||||||
public event GenericCall2 OnRequestWearables = delegate { };
|
public event GenericCall2 OnRequestWearables = delegate { };
|
||||||
public event GenericCall1 OnCompleteMovementToRegion = delegate { };
|
public event GenericCall1 OnCompleteMovementToRegion = delegate { };
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate = delegate { };
|
public event UpdateAgent OnAgentUpdate = delegate { };
|
||||||
public event AgentRequestSit OnAgentRequestSit = delegate { };
|
public event AgentRequestSit OnAgentRequestSit = delegate { };
|
||||||
public event AgentSit OnAgentSit = delegate { };
|
public event AgentSit OnAgentSit = delegate { };
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace OpenSim.Data.MySQL
|
||||||
List<UUID> deleteSessions = new List<UUID>();
|
List<UUID> deleteSessions = new List<UUID>();
|
||||||
int online = 0;
|
int online = 0;
|
||||||
|
|
||||||
while(reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
if (bool.Parse(reader["Online"].ToString()))
|
if (bool.Parse(reader["Online"].ToString()))
|
||||||
online++;
|
online++;
|
||||||
|
|
|
@ -881,6 +881,7 @@ namespace OpenSim.Framework
|
||||||
event Action<IClientAPI> OnRegionHandShakeReply;
|
event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
event GenericCall2 OnRequestWearables;
|
event GenericCall2 OnRequestWearables;
|
||||||
event GenericCall1 OnCompleteMovementToRegion;
|
event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
event UpdateAgent OnPreAgentUpdate;
|
||||||
event UpdateAgent OnAgentUpdate;
|
event UpdateAgent OnAgentUpdate;
|
||||||
event AgentRequestSit OnAgentRequestSit;
|
event AgentRequestSit OnAgentRequestSit;
|
||||||
event AgentSit OnAgentSit;
|
event AgentSit OnAgentSit;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
@ -127,6 +127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public event ObjectDeselect OnObjectDetach;
|
public event ObjectDeselect OnObjectDetach;
|
||||||
public event ObjectDrop OnObjectDrop;
|
public event ObjectDrop OnObjectDrop;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
@ -4893,7 +4894,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
UpdateAgent handlerAgentUpdate = OnAgentUpdate;
|
UpdateAgent handlerAgentUpdate = OnAgentUpdate;
|
||||||
lastarg = arg; // save this set of arguments for nexttime
|
lastarg = arg; // save this set of arguments for nexttime
|
||||||
if (handlerAgentUpdate != null)
|
if (handlerAgentUpdate != null)
|
||||||
|
{
|
||||||
|
OnPreAgentUpdate(this, arg);
|
||||||
OnAgentUpdate(this, arg);
|
OnAgentUpdate(this, arg);
|
||||||
|
}
|
||||||
|
|
||||||
handlerAgentUpdate = null;
|
handlerAgentUpdate = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,11 +394,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
public IClientAPI LocateClientObject(UUID agentID)
|
public IClientAPI LocateClientObject(UUID agentID)
|
||||||
{
|
{
|
||||||
Scene scene = GetClientScene(agentID);
|
Scene scene = GetClientScene(agentID);
|
||||||
if(scene == null)
|
if (scene == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
ScenePresence presence = scene.GetScenePresence(agentID);
|
ScenePresence presence = scene.GetScenePresence(agentID);
|
||||||
if(presence == null)
|
if (presence == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return presence.ControllingClient;
|
return presence.ControllingClient;
|
||||||
|
@ -481,7 +481,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
m_log.DebugFormat("[FRIENDS]: {0} offered friendship to {1}", principalID, friendID);
|
m_log.DebugFormat("[FRIENDS]: {0} offered friendship to {1}", principalID, friendID);
|
||||||
|
|
||||||
// This user wants to be friends with the other user.
|
// This user wants to be friends with the other user.
|
||||||
// Let's add both relations to the DB, but one of them is inactive (-1)
|
// Let's add the relation backwards, in case the other is not online
|
||||||
FriendsService.StoreFriend(friendID, principalID.ToString(), 0);
|
FriendsService.StoreFriend(friendID, principalID.ToString(), 0);
|
||||||
|
|
||||||
// Now let's ask the other user to be friends with this user
|
// Now let's ask the other user to be friends with this user
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
if (!m_Enabled)
|
if (!m_Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lock(m_Scenes)
|
lock (m_Scenes)
|
||||||
{
|
{
|
||||||
m_Scenes.Remove(scene);
|
m_Scenes.Remove(scene);
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,26 +142,27 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
|
|
||||||
public UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
public UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
||||||
{
|
{
|
||||||
UserAccount account = m_Cache.Get(userID);
|
bool inCache = false;
|
||||||
if (account != null)
|
UserAccount account = m_Cache.Get(userID, out inCache);
|
||||||
|
if (inCache)
|
||||||
return account;
|
return account;
|
||||||
|
|
||||||
account = m_UserService.GetUserAccount(scopeID, userID);
|
account = m_UserService.GetUserAccount(scopeID, userID);
|
||||||
if (account != null)
|
m_Cache.Cache(userID, account);
|
||||||
m_Cache.Cache(account);
|
|
||||||
|
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
|
public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
|
||||||
{
|
{
|
||||||
UserAccount account = m_Cache.Get(firstName + " " + lastName);
|
bool inCache = false;
|
||||||
if (account != null)
|
UserAccount account = m_Cache.Get(firstName + " " + lastName, out inCache);
|
||||||
|
if (inCache)
|
||||||
return account;
|
return account;
|
||||||
|
|
||||||
account = m_UserService.GetUserAccount(scopeID, firstName, lastName);
|
account = m_UserService.GetUserAccount(scopeID, firstName, lastName);
|
||||||
if (account != null)
|
if (account != null)
|
||||||
m_Cache.Cache(account);
|
m_Cache.Cache(account.PrincipalID, account);
|
||||||
|
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,26 +119,27 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
|
|
||||||
public override UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
public override UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
||||||
{
|
{
|
||||||
UserAccount account = m_Cache.Get(userID);
|
bool inCache = false;
|
||||||
if (account != null)
|
UserAccount account = m_Cache.Get(userID, out inCache);
|
||||||
|
if (inCache)
|
||||||
return account;
|
return account;
|
||||||
|
|
||||||
account = base.GetUserAccount(scopeID, userID);
|
account = base.GetUserAccount(scopeID, userID);
|
||||||
if (account != null)
|
m_Cache.Cache(userID, account);
|
||||||
m_Cache.Cache(account);
|
|
||||||
|
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
|
public override UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
|
||||||
{
|
{
|
||||||
UserAccount account = m_Cache.Get(firstName + " " + lastName);
|
bool inCache = false;
|
||||||
if (account != null)
|
UserAccount account = m_Cache.Get(firstName + " " + lastName, out inCache);
|
||||||
|
if (inCache)
|
||||||
return account;
|
return account;
|
||||||
|
|
||||||
account = base.GetUserAccount(scopeID, firstName, lastName);
|
account = base.GetUserAccount(scopeID, firstName, lastName);
|
||||||
if (account != null)
|
if (account != null)
|
||||||
m_Cache.Cache(account);
|
m_Cache.Cache(account.PrincipalID, account);
|
||||||
|
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,50 +36,58 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||||
{
|
{
|
||||||
public class UserAccountCache
|
public class UserAccountCache
|
||||||
{
|
{
|
||||||
//private static readonly ILog m_log =
|
private static readonly ILog m_log =
|
||||||
// LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
private ExpiringCache<UUID, UserAccount> m_UUIDCache;
|
||||||
private ICnmCache<UUID, UserAccount> m_UUIDCache;
|
private ExpiringCache<string, UUID> m_NameCache;
|
||||||
private Dictionary<string, UUID> m_NameCache;
|
|
||||||
|
|
||||||
public UserAccountCache()
|
public UserAccountCache()
|
||||||
{
|
{
|
||||||
// Warning: the size values are a bit fuzzy. What matters
|
// Warning: the size values are a bit fuzzy. What matters
|
||||||
// most for this cache is the count value (128 entries).
|
// most for this cache is the count value (128 entries).
|
||||||
m_UUIDCache = CnmSynchronizedCache<UUID, UserAccount>.Synchronized(new CnmMemoryCache<UUID, UserAccount>(
|
m_UUIDCache = new ExpiringCache<UUID, UserAccount>();
|
||||||
128, 128*512, TimeSpan.FromMinutes(30.0)));
|
m_NameCache = new ExpiringCache<string, UUID>(); // this one is unbound
|
||||||
m_NameCache = new Dictionary<string, UUID>(); // this one is unbound
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Cache(UserAccount account)
|
public void Cache(UUID userID, UserAccount account)
|
||||||
{
|
{
|
||||||
m_UUIDCache.Set(account.PrincipalID, account, 512);
|
// Cache even null accounts
|
||||||
m_NameCache[account.Name] = account.PrincipalID;
|
m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d));
|
||||||
|
if (account != null)
|
||||||
|
m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d));
|
||||||
|
|
||||||
//m_log.DebugFormat("[USER CACHE]: cached user {0} {1}", account.FirstName, account.LastName);
|
m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserAccount Get(UUID userID)
|
public UserAccount Get(UUID userID, out bool inCache)
|
||||||
{
|
{
|
||||||
UserAccount account = null;
|
UserAccount account = null;
|
||||||
|
inCache = false;
|
||||||
if (m_UUIDCache.TryGetValue(userID, out account))
|
if (m_UUIDCache.TryGetValue(userID, out account))
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("[USER CACHE]: Account {0} {1} found in cache", account.FirstName, account.LastName);
|
//m_log.DebugFormat("[USER CACHE]: Account {0} {1} found in cache", account.FirstName, account.LastName);
|
||||||
|
inCache = true;
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserAccount Get(string name)
|
public UserAccount Get(string name, out bool inCache)
|
||||||
{
|
{
|
||||||
if (!m_NameCache.ContainsKey(name))
|
inCache = false;
|
||||||
|
if (!m_NameCache.Contains(name))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
UserAccount account = null;
|
UserAccount account = null;
|
||||||
if (m_UUIDCache.TryGetValue(m_NameCache[name], out account))
|
UUID uuid = UUID.Zero;
|
||||||
|
if (m_NameCache.TryGetValue(name, out uuid))
|
||||||
|
if (m_UUIDCache.TryGetValue(uuid, out account))
|
||||||
|
{
|
||||||
|
inCache = true;
|
||||||
return account;
|
return account;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
@ -84,6 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
// caches ExtendedLandData
|
// caches ExtendedLandData
|
||||||
private Cache parcelInfoCache;
|
private Cache parcelInfoCache;
|
||||||
|
private Vector3? forcedPosition = null;
|
||||||
|
|
||||||
#region INonSharedRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
|
@ -136,6 +138,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
|
||||||
|
{
|
||||||
|
ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y);
|
||||||
|
reason = "You are not allowed to enter this sim.";
|
||||||
|
return nearestParcel != null;
|
||||||
|
}
|
||||||
|
|
||||||
void EventManagerOnNewClient(IClientAPI client)
|
void EventManagerOnNewClient(IClientAPI client)
|
||||||
{
|
{
|
||||||
//Register some client events
|
//Register some client events
|
||||||
|
@ -153,6 +162,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
client.OnParcelInfoRequest += ClientOnParcelInfoRequest;
|
client.OnParcelInfoRequest += ClientOnParcelInfoRequest;
|
||||||
client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
|
client.OnParcelDwellRequest += ClientOnParcelDwellRequest;
|
||||||
client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup;
|
client.OnParcelDeedToGroup += ClientOnParcelDeedToGroup;
|
||||||
|
client.OnPreAgentUpdate += ClientOnPreAgentUpdate;
|
||||||
|
|
||||||
EntityBase presenceEntity;
|
EntityBase presenceEntity;
|
||||||
if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence)
|
if (m_scene.Entities.TryGetValue(client.AgentId, out presenceEntity) && presenceEntity is ScenePresence)
|
||||||
|
@ -162,6 +172,40 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
||||||
|
{
|
||||||
|
//If we are forcing a position for them to go
|
||||||
|
if (forcedPosition != null)
|
||||||
|
{
|
||||||
|
ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId);
|
||||||
|
|
||||||
|
//Putting the user into flying, both keeps the avatar in fligth when it bumps into something and stopped from going another direction AND
|
||||||
|
//When the avatar walks into a ban line on the ground, it prevents getting stuck
|
||||||
|
agentData.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
|
||||||
|
|
||||||
|
|
||||||
|
//Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines
|
||||||
|
if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition));
|
||||||
|
forcedPosition = null;
|
||||||
|
}
|
||||||
|
//if we are far away, teleport
|
||||||
|
else if (Vector3.Distance(clientAvatar.AbsolutePosition,forcedPosition.Value) > 3)
|
||||||
|
{
|
||||||
|
Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}",forcedPosition.Value,clientAvatar.AbsolutePosition));
|
||||||
|
clientAvatar.Teleport(forcedPosition.Value);
|
||||||
|
forcedPosition = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Forces them toward the forced position we want if they aren't there yet
|
||||||
|
agentData.UseClientAgentPosition = true;
|
||||||
|
agentData.ClientAgentPosition = forcedPosition.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
|
@ -267,9 +311,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendAlertMessage(
|
avatar.ControllingClient.SendAlertMessage(
|
||||||
"You are not allowed on this parcel because you are banned. Please go away.");
|
"You are not allowed on this parcel because you are banned. Please go away.");
|
||||||
|
|
||||||
avatar.PhysicsActor.Position = avatar.lastKnownAllowedPosition;
|
|
||||||
avatar.PhysicsActor.Velocity = Vector3.Zero;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -278,6 +319,24 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position)
|
||||||
|
{
|
||||||
|
if (m_scene.Permissions.IsGod(avatar.UUID)) return;
|
||||||
|
if (position.HasValue)
|
||||||
|
{
|
||||||
|
forcedPosition = position;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendYouAreRestrictedNotice(ScenePresence avatar)
|
||||||
|
{
|
||||||
|
avatar.ControllingClient.SendAlertMessage(
|
||||||
|
"You are not allowed on this parcel because the land owner has restricted access.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
|
||||||
{
|
{
|
||||||
if (m_scene.RegionInfo.RegionID == regionID)
|
if (m_scene.RegionInfo.RegionID == regionID)
|
||||||
|
@ -295,11 +354,12 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
|
if (parcelAvatarIsEntering.IsBannedFromLand(avatar.UUID))
|
||||||
{
|
{
|
||||||
SendYouAreBannedNotice(avatar);
|
SendYouAreBannedNotice(avatar);
|
||||||
|
ForceAvatarToPosition(avatar, m_scene.GetNearestAllowedPosition(avatar));
|
||||||
}
|
}
|
||||||
else if (parcelAvatarIsEntering.IsRestrictedFromLand(avatar.UUID))
|
else if (parcelAvatarIsEntering.IsRestrictedFromLand(avatar.UUID))
|
||||||
{
|
{
|
||||||
avatar.ControllingClient.SendAlertMessage(
|
SendYouAreRestrictedNotice(avatar);
|
||||||
"You are not allowed on this parcel because the land owner has restricted access. For now, you can enter, but please respect the land owner's decisions (or he can ban you!).");
|
ForceAvatarToPosition(avatar, m_scene.GetNearestAllowedPosition(avatar));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -399,8 +459,27 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
|
||||||
parcel.IsBannedFromLand(clientAvatar.UUID))
|
parcel.IsBannedFromLand(clientAvatar.UUID))
|
||||||
|
{
|
||||||
|
//once we've sent the message once, keep going toward the target until we are done
|
||||||
|
if (forcedPosition == null)
|
||||||
{
|
{
|
||||||
SendYouAreBannedNotice(clientAvatar);
|
SendYouAreBannedNotice(clientAvatar);
|
||||||
|
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
|
||||||
|
{
|
||||||
|
//once we've sent the message once, keep going toward the target until we are done
|
||||||
|
if (forcedPosition == null)
|
||||||
|
{
|
||||||
|
SendYouAreRestrictedNotice(clientAvatar);
|
||||||
|
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//when we are finally in a safe place, lets release the forced position lock
|
||||||
|
forcedPosition = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,7 +491,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
if (over != null)
|
if (over != null)
|
||||||
{
|
{
|
||||||
if (!over.IsBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT)
|
if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT))
|
||||||
{
|
{
|
||||||
avatar.lastKnownAllowedPosition =
|
avatar.lastKnownAllowedPosition =
|
||||||
new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
|
new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
|
||||||
|
|
|
@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
/// <returns>Returns true if the piece of land contains the specified point</returns>
|
/// <returns>Returns true if the piece of land contains the specified point</returns>
|
||||||
public bool ContainsPoint(int x, int y)
|
public bool ContainsPoint(int x, int y)
|
||||||
{
|
{
|
||||||
if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize)
|
if (x >= 0 && y >= 0 && x <= Constants.RegionSize && y <= Constants.RegionSize)
|
||||||
{
|
{
|
||||||
return (LandBitmap[x / 4, y / 4] == true);
|
return (LandBitmap[x / 4, y / 4] == true);
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
entry.AgentID = avatar;
|
entry.AgentID = avatar;
|
||||||
entry.Flags = AccessList.Ban;
|
entry.Flags = AccessList.Ban;
|
||||||
entry.Time = new DateTime();
|
entry.Time = new DateTime();
|
||||||
if (LandData.ParcelAccessList.Contains(entry))
|
//See if they are on the list, but make sure the owner isn't banned
|
||||||
|
if (LandData.ParcelAccessList.Contains(entry) && LandData.OwnerID != avatar)
|
||||||
{
|
{
|
||||||
//They are banned, so lets send them a notice about this parcel
|
//They are banned, so lets send them a notice about this parcel
|
||||||
return true;
|
return true;
|
||||||
|
@ -303,7 +304,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
entry.AgentID = avatar;
|
entry.AgentID = avatar;
|
||||||
entry.Flags = AccessList.Access;
|
entry.Flags = AccessList.Access;
|
||||||
entry.Time = new DateTime();
|
entry.Time = new DateTime();
|
||||||
if (!LandData.ParcelAccessList.Contains(entry))
|
|
||||||
|
//If they are not on the access list and are not the owner
|
||||||
|
if (!LandData.ParcelAccessList.Contains(entry) && LandData.OwnerID != avatar)
|
||||||
{
|
{
|
||||||
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
|
//They are not allowed in this parcel, but not banned, so lets send them a notice about this parcel
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -490,6 +490,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
|
|
||||||
if (m_allowGridGods)
|
if (m_allowGridGods)
|
||||||
{
|
{
|
||||||
|
ScenePresence sp = m_scene.GetScenePresence(user);
|
||||||
|
if (sp != null)
|
||||||
|
{
|
||||||
|
if (sp.UserLevel >= 200)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user);
|
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user);
|
||||||
if (account != null)
|
if (account != null)
|
||||||
{
|
{
|
||||||
|
@ -610,7 +618,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
return objectOwnerMask;
|
return objectOwnerMask;
|
||||||
|
|
||||||
// Estate users should be able to edit anything in the sim if RegionOwnerIsGod is set
|
// Estate users should be able to edit anything in the sim if RegionOwnerIsGod is set
|
||||||
if (IsEstateManager(user) && m_RegionOwnerIsGod)
|
if (m_RegionOwnerIsGod && IsEstateManager(user) && !IsAdministrator(objectOwner))
|
||||||
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)
|
||||||
|
|
|
@ -84,6 +84,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
public event GenericCall2 OnRequestWearables;
|
public event GenericCall2 OnRequestWearables;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -3224,6 +3225,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// also return a reason.</returns>
|
/// also return a reason.</returns>
|
||||||
public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
|
public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
|
||||||
{
|
{
|
||||||
|
TeleportFlags tp = (TeleportFlags)teleportFlags;
|
||||||
//Teleport flags:
|
//Teleport flags:
|
||||||
//
|
//
|
||||||
// TeleportFlags.ViaGodlikeLure - Border Crossing
|
// TeleportFlags.ViaGodlikeLure - Border Crossing
|
||||||
|
@ -3257,6 +3259,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
CapsModule.NewUserConnection(agent);
|
CapsModule.NewUserConnection(agent);
|
||||||
|
|
||||||
|
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
|
||||||
|
|
||||||
|
//On login or border crossing test land permisions
|
||||||
|
if (tp != TeleportFlags.Default)
|
||||||
|
{
|
||||||
|
if (land != null && !TestLandRestrictions(agent, land, out reason))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID);
|
ScenePresence sp = m_sceneGraph.GetScenePresence(agent.AgentID);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
|
@ -3329,7 +3342,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Honor parcel landing type and position.
|
// Honor parcel landing type and position.
|
||||||
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
|
|
||||||
if (land != null)
|
if (land != null)
|
||||||
{
|
{
|
||||||
if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
|
if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
|
||||||
|
@ -3345,6 +3357,40 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool TestLandRestrictions(AgentCircuitData agent, ILandObject land, out string reason)
|
||||||
|
{
|
||||||
|
|
||||||
|
bool banned = land.IsBannedFromLand(agent.AgentID);
|
||||||
|
bool restricted = land.IsRestrictedFromLand(agent.AgentID);
|
||||||
|
|
||||||
|
if (banned || restricted)
|
||||||
|
{
|
||||||
|
ILandObject nearestParcel = GetNearestAllowedParcel(agent.AgentID, agent.startpos.X, agent.startpos.Y);
|
||||||
|
if (nearestParcel != null)
|
||||||
|
{
|
||||||
|
//Move agent to nearest allowed
|
||||||
|
Vector3 newPosition = GetParcelCenterAtGround(nearestParcel);
|
||||||
|
agent.startpos.X = newPosition.X;
|
||||||
|
agent.startpos.Y = newPosition.Y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (banned)
|
||||||
|
{
|
||||||
|
reason = "Cannot regioncross into banned parcel.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reason = String.Format("Denied access to private region {0}: You are not on the access list for that region.",
|
||||||
|
RegionInfo.RegionName);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reason = "";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Verifies that the user has a presence on the Grid
|
/// Verifies that the user has a presence on the Grid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -3476,6 +3522,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ILandObject GetParcelAtPoint(float x, float y)
|
||||||
|
{
|
||||||
|
foreach (var parcel in AllParcels())
|
||||||
|
{
|
||||||
|
if (parcel.ContainsPoint((int)x,(int)y))
|
||||||
|
{
|
||||||
|
return parcel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update an AgentCircuitData object with new information
|
/// Update an AgentCircuitData object with new information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -4748,5 +4806,175 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
get { return m_allowScriptCrossings; }
|
get { return m_allowScriptCrossings; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Vector3? GetNearestAllowedPosition(ScenePresence avatar)
|
||||||
|
{
|
||||||
|
//simulate to make sure we have pretty up to date positions
|
||||||
|
PhysicsScene.Simulate(0);
|
||||||
|
|
||||||
|
ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
||||||
|
|
||||||
|
if (nearestParcel != null)
|
||||||
|
{
|
||||||
|
Vector3 dir = Vector3.Normalize(Vector3.Multiply(avatar.Velocity, -1));
|
||||||
|
//Try to get a location that feels like where they came from
|
||||||
|
Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
|
||||||
|
if (nearestPoint != null)
|
||||||
|
{
|
||||||
|
Debug.WriteLine("Found a sane previous position based on velocity, sending them to: " + nearestPoint.ToString());
|
||||||
|
return nearestPoint.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Sometimes velocity might be zero (local teleport), so try finding point along path from avatar to center of nearest parcel
|
||||||
|
Vector3 directionToParcelCenter = Vector3.Subtract(GetParcelCenterAtGround(nearestParcel), avatar.AbsolutePosition);
|
||||||
|
dir = Vector3.Normalize(directionToParcelCenter);
|
||||||
|
nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
|
||||||
|
if (nearestPoint != null)
|
||||||
|
{
|
||||||
|
Debug.WriteLine("They had a zero velocity, sending them to: " + nearestPoint.ToString());
|
||||||
|
return nearestPoint.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Ultimate backup if we have no idea where they are
|
||||||
|
Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
|
||||||
|
return avatar.lastKnownAllowedPosition;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Go to the edge, this happens in teleporting to a region with no available parcels
|
||||||
|
Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar);
|
||||||
|
//Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString());
|
||||||
|
return nearestRegionEdgePoint;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 GetParcelCenterAtGround(ILandObject parcel)
|
||||||
|
{
|
||||||
|
Vector2 center = GetParcelCenter(parcel);
|
||||||
|
return GetPositionAtGround(center.X, center.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3? GetNearestPointInParcelAlongDirectionFromPoint(Vector3 pos, Vector3 direction, ILandObject parcel)
|
||||||
|
{
|
||||||
|
Vector3 unitDirection = Vector3.Normalize(direction);
|
||||||
|
//Making distance to search go through some sane limit of distance
|
||||||
|
for (float distance = 0; distance < Constants.RegionSize * 2; distance += .5f)
|
||||||
|
{
|
||||||
|
Vector3 testPos = Vector3.Add(pos, Vector3.Multiply(unitDirection, distance));
|
||||||
|
if (parcel.ContainsPoint((int)testPos.X, (int)testPos.Y))
|
||||||
|
{
|
||||||
|
return testPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ILandObject GetNearestAllowedParcel(UUID avatarId, float x, float y)
|
||||||
|
{
|
||||||
|
List<ILandObject> all = AllParcels();
|
||||||
|
float minParcelDistance = float.MaxValue;
|
||||||
|
ILandObject nearestParcel = null;
|
||||||
|
|
||||||
|
foreach (var parcel in all)
|
||||||
|
{
|
||||||
|
if (!parcel.IsEitherBannedOrRestricted(avatarId))
|
||||||
|
{
|
||||||
|
float parcelDistance = GetParcelDistancefromPoint(parcel, x, y);
|
||||||
|
if (parcelDistance < minParcelDistance)
|
||||||
|
{
|
||||||
|
minParcelDistance = parcelDistance;
|
||||||
|
nearestParcel = parcel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nearestParcel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<ILandObject> AllParcels()
|
||||||
|
{
|
||||||
|
return LandChannel.AllParcels();
|
||||||
|
}
|
||||||
|
|
||||||
|
private float GetParcelDistancefromPoint(ILandObject parcel, float x, float y)
|
||||||
|
{
|
||||||
|
return Vector2.Distance(new Vector2(x, y), GetParcelCenter(parcel));
|
||||||
|
}
|
||||||
|
|
||||||
|
//calculate the average center point of a parcel
|
||||||
|
private Vector2 GetParcelCenter(ILandObject parcel)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
int avgx = 0;
|
||||||
|
int avgy = 0;
|
||||||
|
for (int x = 0; x < Constants.RegionSize; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Constants.RegionSize; y++)
|
||||||
|
{
|
||||||
|
//Just keep a running average as we check if all the points are inside or not
|
||||||
|
if (parcel.ContainsPoint(x, y))
|
||||||
|
{
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
avgx = x;
|
||||||
|
avgy = y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
avgx = (avgx * count + x) / (count + 1);
|
||||||
|
avgy = (avgy * count + y) / (count + 1);
|
||||||
|
}
|
||||||
|
count += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Vector2(avgx, avgy);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 GetNearestRegionEdgePosition(ScenePresence avatar)
|
||||||
|
{
|
||||||
|
float xdistance = avatar.AbsolutePosition.X < Constants.RegionSize / 2 ? avatar.AbsolutePosition.X : Constants.RegionSize - avatar.AbsolutePosition.X;
|
||||||
|
float ydistance = avatar.AbsolutePosition.Y < Constants.RegionSize / 2 ? avatar.AbsolutePosition.Y : Constants.RegionSize - avatar.AbsolutePosition.Y;
|
||||||
|
|
||||||
|
//find out what vertical edge to go to
|
||||||
|
if (xdistance < ydistance)
|
||||||
|
{
|
||||||
|
if (avatar.AbsolutePosition.X < Constants.RegionSize / 2)
|
||||||
|
{
|
||||||
|
return GetPositionAtAvatarHeightOrGroundHeight(avatar, 0.0f, avatar.AbsolutePosition.Y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetPositionAtAvatarHeightOrGroundHeight(avatar, Constants.RegionSize, avatar.AbsolutePosition.Y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//find out what horizontal edge to go to
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (avatar.AbsolutePosition.Y < Constants.RegionSize / 2)
|
||||||
|
{
|
||||||
|
return GetPositionAtAvatarHeightOrGroundHeight(avatar, avatar.AbsolutePosition.X, 0.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetPositionAtAvatarHeightOrGroundHeight(avatar, avatar.AbsolutePosition.X, Constants.RegionSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 GetPositionAtAvatarHeightOrGroundHeight(ScenePresence avatar, float x, float y)
|
||||||
|
{
|
||||||
|
Vector3 ground = GetPositionAtGround(x, y);
|
||||||
|
if (avatar.AbsolutePosition.Z > ground.Z)
|
||||||
|
{
|
||||||
|
ground.Z = avatar.AbsolutePosition.Z;
|
||||||
|
}
|
||||||
|
return ground;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Vector3 GetPositionAtGround(float x, float y)
|
||||||
|
{
|
||||||
|
return new Vector3(x, y, GetGroundHeight(x, y));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private float m_sitAvatarHeight = 2.0f;
|
private float m_sitAvatarHeight = 2.0f;
|
||||||
|
|
||||||
private float m_godlevel;
|
private int m_godLevel;
|
||||||
|
private int m_userLevel;
|
||||||
|
|
||||||
private bool m_invulnerable = true;
|
private bool m_invulnerable = true;
|
||||||
|
|
||||||
|
@ -294,9 +295,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return m_invulnerable; }
|
get { return m_invulnerable; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public float GodLevel
|
public int UserLevel
|
||||||
{
|
{
|
||||||
get { return m_godlevel; }
|
get { return m_userLevel; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GodLevel
|
||||||
|
{
|
||||||
|
get { return m_godLevel; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong RegionHandle
|
public ulong RegionHandle
|
||||||
|
@ -668,6 +674,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_regionInfo = reginfo;
|
m_regionInfo = reginfo;
|
||||||
m_localId = m_scene.AllocateLocalId();
|
m_localId = m_scene.AllocateLocalId();
|
||||||
|
|
||||||
|
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid);
|
||||||
|
|
||||||
|
m_userLevel = account.UserLevel;
|
||||||
|
|
||||||
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
||||||
if (gm != null)
|
if (gm != null)
|
||||||
m_grouptitle = gm.GetGroupTitle(m_uuid);
|
m_grouptitle = gm.GetGroupTitle(m_uuid);
|
||||||
|
@ -2967,17 +2977,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (account != null)
|
if (account != null)
|
||||||
{
|
{
|
||||||
if (account.UserLevel > 0)
|
if (account.UserLevel > 0)
|
||||||
m_godlevel = account.UserLevel;
|
m_godLevel = account.UserLevel;
|
||||||
else
|
else
|
||||||
m_godlevel = 200;
|
m_godLevel = 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_godlevel = 0;
|
m_godLevel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllingClient.SendAdminResponse(token, (uint)m_godlevel);
|
ControllingClient.SendAdminResponse(token, (uint)m_godLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Child Agent Updates
|
#region Child Agent Updates
|
||||||
|
@ -3068,7 +3078,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
cAgent.ControlFlags = (uint)m_AgentControlFlags;
|
cAgent.ControlFlags = (uint)m_AgentControlFlags;
|
||||||
|
|
||||||
if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID)))
|
if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID)))
|
||||||
cAgent.GodLevel = (byte)m_godlevel;
|
cAgent.GodLevel = (byte)m_godLevel;
|
||||||
else
|
else
|
||||||
cAgent.GodLevel = (byte) 0;
|
cAgent.GodLevel = (byte) 0;
|
||||||
|
|
||||||
|
@ -3157,7 +3167,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
|
m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
|
||||||
|
|
||||||
if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID)))
|
if (m_scene.Permissions.IsGod(new UUID(cAgent.AgentID)))
|
||||||
m_godlevel = cAgent.GodLevel;
|
m_godLevel = cAgent.GodLevel;
|
||||||
m_setAlwaysRun = cAgent.AlwaysRun;
|
m_setAlwaysRun = cAgent.AlwaysRun;
|
||||||
|
|
||||||
uint i = 0;
|
uint i = 0;
|
||||||
|
|
|
@ -680,6 +680,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
public event GenericCall2 OnRequestWearables;
|
public event GenericCall2 OnRequestWearables;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
|
|
@ -190,6 +190,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
public event GenericCall2 OnRequestWearables;
|
public event GenericCall2 OnRequestWearables;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
|
|
@ -4024,7 +4024,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( message == string.Empty)
|
if (message == string.Empty)
|
||||||
{
|
{
|
||||||
ShoutError("Trying to use llTextBox with empty message.");
|
ShoutError("Trying to use llTextBox with empty message.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -334,7 +361,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Debug("[HGrid]: Exception " + e.Message);
|
m_log.Debug("[USER AGENT CONNECTOR]: Unable to contact remote server ");
|
||||||
reason = "Exception: " + e.Message;
|
reason = "Exception: " + e.Message;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
public virtual UserAccount GetUserAccount(UUID scopeID, UUID userID)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat("[ACCOUNTS CONNECTOR]: GetUSerAccount {0}", userID);
|
||||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||||
//sendData["SCOPEID"] = scopeID.ToString();
|
//sendData["SCOPEID"] = scopeID.ToString();
|
||||||
sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
|
sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* 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.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
|
@ -200,7 +200,9 @@ namespace OpenSim.Services.UserAccountService
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d.Length < 1)
|
if (d.Length < 1)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return MakeUserAccount(d[0]);
|
return MakeUserAccount(d[0]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
public event Action<IClientAPI> OnRegionHandShakeReply;
|
public event Action<IClientAPI> OnRegionHandShakeReply;
|
||||||
public event GenericCall2 OnRequestWearables;
|
public event GenericCall2 OnRequestWearables;
|
||||||
public event GenericCall1 OnCompleteMovementToRegion;
|
public event GenericCall1 OnCompleteMovementToRegion;
|
||||||
|
public event UpdateAgent OnPreAgentUpdate;
|
||||||
public event UpdateAgent OnAgentUpdate;
|
public event UpdateAgent OnAgentUpdate;
|
||||||
public event AgentRequestSit OnAgentRequestSit;
|
public event AgentRequestSit OnAgentRequestSit;
|
||||||
public event AgentSit OnAgentSit;
|
public event AgentSit OnAgentSit;
|
||||||
|
|
Loading…
Reference in New Issue