Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
commit
1888e174cd
|
@ -1,4 +1,4 @@
|
||||||
The following people have contributed to OpenSim (Thank you
|
<<<>>>>The following people have contributed to OpenSim (Thank you
|
||||||
for your effort!)
|
for your effort!)
|
||||||
|
|
||||||
= Current OpenSim Developers (in very rough order of appearance) =
|
= Current OpenSim Developers (in very rough order of appearance) =
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* 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 OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
|
namespace OpenSim.Framework.Client
|
||||||
|
{
|
||||||
|
public interface IClientInventory
|
||||||
|
{
|
||||||
|
void SendRemoveInventoryFolders(UUID[] folders);
|
||||||
|
void SendRemoveInventoryItems(UUID[] folders);
|
||||||
|
void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items);
|
||||||
|
}
|
||||||
|
}
|
|
@ -114,6 +114,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
private IAssetService m_assetService;
|
private IAssetService m_assetService;
|
||||||
private bool m_dumpAssetsToFile = false;
|
private bool m_dumpAssetsToFile = false;
|
||||||
private string m_regionName;
|
private string m_regionName;
|
||||||
|
private int m_levelUpload = 0;
|
||||||
|
|
||||||
public BunchOfCaps(Scene scene, Caps caps)
|
public BunchOfCaps(Scene scene, Caps caps)
|
||||||
{
|
{
|
||||||
|
@ -124,7 +125,10 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
{
|
{
|
||||||
IConfig sconfig = config.Configs["Startup"];
|
IConfig sconfig = config.Configs["Startup"];
|
||||||
if (sconfig != null)
|
if (sconfig != null)
|
||||||
|
{
|
||||||
m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures);
|
m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures);
|
||||||
|
m_levelUpload = sconfig.GetInt("LevelUpload", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_assetService = m_Scene.AssetService;
|
m_assetService = m_Scene.AssetService;
|
||||||
|
@ -367,21 +371,37 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
llsdRequest.asset_type == "animation" ||
|
llsdRequest.asset_type == "animation" ||
|
||||||
llsdRequest.asset_type == "sound")
|
llsdRequest.asset_type == "sound")
|
||||||
{
|
{
|
||||||
|
ScenePresence avatar = null;
|
||||||
IClientAPI client = null;
|
IClientAPI client = null;
|
||||||
IScene scene = null;
|
m_Scene.TryGetScenePresence(m_HostCapsObj.AgentID, out avatar);
|
||||||
if (GetClient != null)
|
|
||||||
{
|
|
||||||
client = GetClient(m_HostCapsObj.AgentID);
|
|
||||||
scene = client.Scene;
|
|
||||||
|
|
||||||
IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>();
|
// check user level
|
||||||
|
if (avatar != null)
|
||||||
|
{
|
||||||
|
client = avatar.ControllingClient;
|
||||||
|
|
||||||
|
if (avatar.UserLevel < m_levelUpload)
|
||||||
|
{
|
||||||
|
if (client != null)
|
||||||
|
client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false);
|
||||||
|
|
||||||
|
LLSDAssetUploadResponse errorResponse = new LLSDAssetUploadResponse();
|
||||||
|
errorResponse.uploader = "";
|
||||||
|
errorResponse.state = "error";
|
||||||
|
return errorResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// check funds
|
||||||
|
if (client != null)
|
||||||
|
{
|
||||||
|
IMoneyModule mm = m_Scene.RequestModuleInterface<IMoneyModule>();
|
||||||
|
|
||||||
if (mm != null)
|
if (mm != null)
|
||||||
{
|
{
|
||||||
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
|
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
|
||||||
{
|
{
|
||||||
if (client != null)
|
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
|
||||||
|
|
||||||
LLSDAssetUploadResponse errorResponse = new LLSDAssetUploadResponse();
|
LLSDAssetUploadResponse errorResponse = new LLSDAssetUploadResponse();
|
||||||
errorResponse.uploader = "";
|
errorResponse.uploader = "";
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
// private IAssetService m_assetService;
|
// private IAssetService m_assetService;
|
||||||
private bool m_dumpAssetsToFile = false;
|
private bool m_dumpAssetsToFile = false;
|
||||||
private bool m_enabled = true;
|
private bool m_enabled = true;
|
||||||
|
private int m_levelUpload = 0;
|
||||||
|
|
||||||
#region IRegionModuleBase Members
|
#region IRegionModuleBase Members
|
||||||
|
|
||||||
|
@ -72,6 +73,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_enabled = meshConfig.GetBoolean("AllowMeshUpload", true);
|
m_enabled = meshConfig.GetBoolean("AllowMeshUpload", true);
|
||||||
|
m_levelUpload = meshConfig.GetInt("LevelUpload", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene pScene)
|
public void AddRegion(Scene pScene)
|
||||||
|
@ -137,25 +139,41 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
// llsdRequest.asset_type == "animation" ||
|
// llsdRequest.asset_type == "animation" ||
|
||||||
// llsdRequest.asset_type == "sound")
|
// llsdRequest.asset_type == "sound")
|
||||||
// {
|
// {
|
||||||
|
// check user level
|
||||||
|
ScenePresence avatar = null;
|
||||||
IClientAPI client = null;
|
IClientAPI client = null;
|
||||||
|
m_scene.TryGetScenePresence(agentID, out avatar);
|
||||||
|
|
||||||
|
if (avatar != null)
|
||||||
|
{
|
||||||
|
client = avatar.ControllingClient;
|
||||||
|
|
||||||
|
if (avatar.UserLevel < m_levelUpload)
|
||||||
|
{
|
||||||
|
if (client != null)
|
||||||
|
client.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false);
|
||||||
|
|
||||||
|
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||||
|
errorResponse.rsvp = "";
|
||||||
|
errorResponse.state = "error";
|
||||||
|
return errorResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// check funds
|
||||||
IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>();
|
IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>();
|
||||||
|
|
||||||
if (mm != null)
|
if (mm != null)
|
||||||
{
|
{
|
||||||
if (m_scene.TryGetClient(agentID, out client))
|
if (!mm.UploadCovered(agentID, mm.UploadCharge))
|
||||||
{
|
{
|
||||||
if (!mm.UploadCovered(client.AgentId, mm.UploadCharge))
|
if (client != null)
|
||||||
{
|
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
||||||
if (client != null)
|
|
||||||
client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
|
|
||||||
|
|
||||||
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
LLSDNewFileAngentInventoryVariablePriceReplyResponse errorResponse = new LLSDNewFileAngentInventoryVariablePriceReplyResponse();
|
||||||
errorResponse.rsvp = "";
|
errorResponse.rsvp = "";
|
||||||
errorResponse.state = "error";
|
errorResponse.state = "error";
|
||||||
return errorResponse;
|
return errorResponse;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// Handles new client connections
|
/// Handles new client connections
|
||||||
/// Constructor takes a single Packet and authenticates everything
|
/// Constructor takes a single Packet and authenticates everything
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector
|
public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IClientIPEndpoint, IStatsCollector
|
||||||
{
|
{
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
|
/// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details.
|
||||||
|
@ -460,6 +460,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// DebugPacketLevel = 1;
|
// DebugPacketLevel = 1;
|
||||||
|
|
||||||
RegisterInterface<IClientIM>(this);
|
RegisterInterface<IClientIM>(this);
|
||||||
|
RegisterInterface<IClientInventory>(this);
|
||||||
RegisterInterface<IClientChat>(this);
|
RegisterInterface<IClientChat>(this);
|
||||||
RegisterInterface<IClientIPEndpoint>(this);
|
RegisterInterface<IClientIPEndpoint>(this);
|
||||||
|
|
||||||
|
@ -12421,5 +12422,129 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (reply != null)
|
if (reply != null)
|
||||||
OutPacket(reply, ThrottleOutPacketType.Task);
|
OutPacket(reply, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendRemoveInventoryItems(UUID[] items)
|
||||||
|
{
|
||||||
|
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||||
|
|
||||||
|
if (eq == null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[LLCLIENT]: Null event queue");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
OSDMap llsd = new OSDMap(3);
|
||||||
|
|
||||||
|
OSDMap AgentDataMap = new OSDMap(1);
|
||||||
|
AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||||
|
AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
|
||||||
|
|
||||||
|
OSDArray AgentData = new OSDArray(1);
|
||||||
|
AgentData.Add(AgentDataMap);
|
||||||
|
|
||||||
|
llsd.Add("AgentData", AgentData);
|
||||||
|
|
||||||
|
OSDArray ItemData = new OSDArray();
|
||||||
|
|
||||||
|
foreach (UUID item in items)
|
||||||
|
{
|
||||||
|
OSDMap ItemDataMap = new OSDMap(2);
|
||||||
|
ItemDataMap.Add("ItemID", OSD.FromUUID(item));
|
||||||
|
ItemDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||||
|
|
||||||
|
ItemData.Add(ItemDataMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
llsd.Add("ItemData", ItemData);
|
||||||
|
|
||||||
|
eq.Enqueue(BuildEvent("RemoveInventoryItem",
|
||||||
|
llsd), AgentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendRemoveInventoryFolders(UUID[] folders)
|
||||||
|
{
|
||||||
|
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||||
|
|
||||||
|
if (eq == null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[LLCLIENT]: Null event queue");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
OSDMap llsd = new OSDMap(3);
|
||||||
|
|
||||||
|
OSDMap AgentDataMap = new OSDMap(1);
|
||||||
|
AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||||
|
AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
|
||||||
|
|
||||||
|
OSDArray AgentData = new OSDArray(1);
|
||||||
|
AgentData.Add(AgentDataMap);
|
||||||
|
|
||||||
|
llsd.Add("AgentData", AgentData);
|
||||||
|
|
||||||
|
OSDArray FolderData = new OSDArray();
|
||||||
|
|
||||||
|
foreach (UUID folder in folders)
|
||||||
|
{
|
||||||
|
OSDMap FolderDataMap = new OSDMap(2);
|
||||||
|
FolderDataMap.Add("FolderID", OSD.FromUUID(folder));
|
||||||
|
FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||||
|
|
||||||
|
FolderData.Add(FolderDataMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
llsd.Add("FolderData", FolderData);
|
||||||
|
|
||||||
|
eq.Enqueue(BuildEvent("RemoveInventoryFolder",
|
||||||
|
llsd), AgentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items)
|
||||||
|
{
|
||||||
|
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||||
|
|
||||||
|
if (eq == null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[LLCLIENT]: Null event queue");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
OSDMap llsd = new OSDMap(3);
|
||||||
|
|
||||||
|
OSDMap AgentDataMap = new OSDMap(1);
|
||||||
|
AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||||
|
AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
|
||||||
|
|
||||||
|
OSDArray AgentData = new OSDArray(1);
|
||||||
|
AgentData.Add(AgentDataMap);
|
||||||
|
|
||||||
|
llsd.Add("AgentData", AgentData);
|
||||||
|
|
||||||
|
OSDArray FolderData = new OSDArray();
|
||||||
|
|
||||||
|
foreach (InventoryFolderBase folder in folders)
|
||||||
|
{
|
||||||
|
OSDMap FolderDataMap = new OSDMap(5);
|
||||||
|
FolderDataMap.Add("FolderID", OSD.FromUUID(folder.ID));
|
||||||
|
FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId));
|
||||||
|
FolderDataMap.Add("ParentID", OSD.FromUUID(folder.ParentID));
|
||||||
|
FolderDataMap.Add("Type", OSD.FromInteger(folder.Type));
|
||||||
|
FolderDataMap.Add("Name", OSD.FromString(folder.Name));
|
||||||
|
|
||||||
|
FolderData.Add(FolderDataMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
llsd.Add("FolderData", FolderData);
|
||||||
|
|
||||||
|
OSDArray ItemData = new OSDArray();
|
||||||
|
|
||||||
|
foreach (InventoryItemBase item in items)
|
||||||
|
{
|
||||||
|
OSDMap ItemDataMap = new OSDMap();
|
||||||
|
ItemData.Add(ItemDataMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
llsd.Add("ItemData", ItemData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
|
|
||||||
protected Scene m_Scene;
|
protected Scene m_Scene;
|
||||||
private bool m_dumpAssetsToFile = false;
|
private bool m_dumpAssetsToFile = false;
|
||||||
|
private int m_levelUpload = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Each agent has its own singleton collection of transactions
|
/// Each agent has its own singleton collection of transactions
|
||||||
|
@ -56,8 +57,13 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
|
|
||||||
#region IRegionModule Members
|
#region IRegionModule Members
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
IConfig sconfig = source.Configs["Startup"];
|
||||||
|
if (sconfig != null)
|
||||||
|
{
|
||||||
|
m_levelUpload = sconfig.GetInt("LevelUpload", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
|
@ -241,7 +247,21 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
(AssetType)type == AssetType.Animation) &&
|
(AssetType)type == AssetType.Animation) &&
|
||||||
tempFile == false)
|
tempFile == false)
|
||||||
{
|
{
|
||||||
|
ScenePresence avatar = null;
|
||||||
Scene scene = (Scene)remoteClient.Scene;
|
Scene scene = (Scene)remoteClient.Scene;
|
||||||
|
scene.TryGetScenePresence(remoteClient.AgentId, out avatar);
|
||||||
|
|
||||||
|
// check user level
|
||||||
|
if (avatar != null)
|
||||||
|
{
|
||||||
|
if (avatar.UserLevel < m_levelUpload)
|
||||||
|
{
|
||||||
|
remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// check funds
|
||||||
IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>();
|
IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>();
|
||||||
|
|
||||||
if (mm != null)
|
if (mm != null)
|
||||||
|
|
|
@ -214,6 +214,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
|
|
||||||
public virtual void RegionLoaded(Scene scene)
|
public virtual void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
|
scene.AddCommand(
|
||||||
|
"Friends", this, "friends show cache",
|
||||||
|
"friends show cache [<first-name> <last-name>]",
|
||||||
|
"Show the friends cache for the given user",
|
||||||
|
HandleFriendsShowCacheCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
|
@ -903,7 +908,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
/// Get friends from local cache only
|
/// Get friends from local cache only
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="agentID"></param>
|
/// <param name="agentID"></param>
|
||||||
/// <returns></returns>
|
/// <returns>
|
||||||
|
/// An empty array if the user has no friends or friends have not been cached.
|
||||||
|
/// </returns>
|
||||||
protected FriendInfo[] GetFriends(UUID agentID)
|
protected FriendInfo[] GetFriends(UUID agentID)
|
||||||
{
|
{
|
||||||
UserFriendData friendsData;
|
UserFriendData friendsData;
|
||||||
|
@ -952,6 +959,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Are friends cached on this simulator for a particular user?
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected bool AreFriendsCached(UUID userID)
|
||||||
|
{
|
||||||
|
lock (m_Friends)
|
||||||
|
return m_Friends.ContainsKey(userID);
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual bool StoreRights(UUID agentID, UUID friendID, int rights)
|
protected virtual bool StoreRights(UUID agentID, UUID friendID, int rights)
|
||||||
{
|
{
|
||||||
FriendsService.StoreFriend(agentID.ToString(), friendID.ToString(), rights);
|
FriendsService.StoreFriend(agentID.ToString(), friendID.ToString(), rights);
|
||||||
|
@ -977,5 +995,61 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
protected void HandleFriendsShowCacheCommand(string module, string[] cmd)
|
||||||
|
{
|
||||||
|
if (cmd.Length != 5)
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("Usage: friends show cache [<first-name> <last-name>]");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string firstName = cmd[3];
|
||||||
|
string lastName = cmd[4];
|
||||||
|
|
||||||
|
IUserManagement umModule = m_Scenes[0].RequestModuleInterface<IUserManagement>();
|
||||||
|
UUID userId = umModule.GetUserIdByName(firstName, lastName);
|
||||||
|
|
||||||
|
// UserAccount ua
|
||||||
|
// = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, firstName, lastName);
|
||||||
|
|
||||||
|
if (userId == UUID.Zero)
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("No such user as {0} {1}", firstName, lastName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!AreFriendsCached(userId))
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("No friends cached on this simulator for {0} {1}", firstName, lastName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MainConsole.Instance.OutputFormat("Cached friends for {0} {1}:", firstName, lastName);
|
||||||
|
|
||||||
|
MainConsole.Instance.OutputFormat("UUID\n");
|
||||||
|
|
||||||
|
FriendInfo[] friends = GetFriends(userId);
|
||||||
|
|
||||||
|
foreach (FriendInfo friend in friends)
|
||||||
|
{
|
||||||
|
// MainConsole.Instance.OutputFormat(friend.PrincipalID.ToString());
|
||||||
|
|
||||||
|
// string friendFirstName, friendLastName;
|
||||||
|
//
|
||||||
|
// UserAccount friendUa
|
||||||
|
// = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, friend.PrincipalID);
|
||||||
|
|
||||||
|
UUID friendId;
|
||||||
|
string friendName;
|
||||||
|
|
||||||
|
if (UUID.TryParse(friend.Friend, out friendId))
|
||||||
|
friendName = umModule.GetUserName(friendId);
|
||||||
|
else
|
||||||
|
friendName = friend.Friend;
|
||||||
|
|
||||||
|
MainConsole.Instance.OutputFormat("{0} {1} {2}", friendName, friend.MyFlags, friend.TheirFlags);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
set { m_MaxTransferDistance = value; }
|
set { m_MaxTransferDistance = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int m_levelHGTeleport = 0;
|
||||||
|
|
||||||
protected bool m_Enabled = false;
|
protected bool m_Enabled = false;
|
||||||
protected Scene m_aScene;
|
protected Scene m_aScene;
|
||||||
protected List<Scene> m_Scenes = new List<Scene>();
|
protected List<Scene> m_Scenes = new List<Scene>();
|
||||||
|
@ -101,7 +103,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
IConfig transferConfig = source.Configs["EntityTransfer"];
|
IConfig transferConfig = source.Configs["EntityTransfer"];
|
||||||
if (transferConfig != null)
|
if (transferConfig != null)
|
||||||
|
{
|
||||||
MaxTransferDistance = transferConfig.GetInt("max_distance", 4095);
|
MaxTransferDistance = transferConfig.GetInt("max_distance", 4095);
|
||||||
|
m_levelHGTeleport = transferConfig.GetInt("LevelHGTeleport", 0);
|
||||||
|
}
|
||||||
|
|
||||||
m_agentsInTransit = new List<UUID>();
|
m_agentsInTransit = new List<UUID>();
|
||||||
m_Enabled = true;
|
m_Enabled = true;
|
||||||
|
@ -228,6 +233,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if HyperGrid teleport is allowed, based on user level
|
||||||
|
int flags = m_aScene.GridService.GetRegionFlags(sp.Scene.RegionInfo.ScopeID, reg.RegionID);
|
||||||
|
|
||||||
|
if (((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) && (sp.UserLevel < m_levelHGTeleport))
|
||||||
|
{
|
||||||
|
m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination link is non permitted hypergrid region. Unable to teleport agent.");
|
||||||
|
sp.ControllingClient.SendTeleportFailed("HyperGrid teleport not permitted");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uint curX = 0, curY = 0;
|
uint curX = 0, curY = 0;
|
||||||
Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY);
|
Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY);
|
||||||
int curCellX = (int)(curX / Constants.RegionSize);
|
int curCellX = (int)(curX / Constants.RegionSize);
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Services.Connectors.Hypergrid;
|
using OpenSim.Services.Connectors.Hypergrid;
|
||||||
|
@ -177,9 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
logout = success; // flag for later logout from this grid; this is an HG TP
|
logout = success; // flag for later logout from this grid; this is an HG TP
|
||||||
|
|
||||||
if (success && m_RestrictInventoryAccessAbroad)
|
if (success && m_RestrictInventoryAccessAbroad)
|
||||||
{
|
RemoveRootFolderContents(sp.ControllingClient);
|
||||||
// TODO tell the viewer to remove the root folder
|
|
||||||
}
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -304,13 +303,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
base.Fail(sp, finalDestination, logout);
|
base.Fail(sp, finalDestination, logout);
|
||||||
if (logout && m_RestrictInventoryAccessAbroad)
|
if (logout && m_RestrictInventoryAccessAbroad)
|
||||||
{
|
{
|
||||||
// Restore the user's inventory, because we removed it earlier on
|
RestoreRootFolderContents(sp.ControllingClient);
|
||||||
InventoryFolderBase root = m_Scenes[0].InventoryService.GetRootFolder(sp.UUID);
|
|
||||||
if (root != null)
|
|
||||||
{
|
|
||||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Restoring");
|
|
||||||
sp.ControllingClient.SendBulkUpdateInventory(root);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,6 +361,47 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private void RemoveRootFolderContents(IClientAPI client)
|
||||||
|
{
|
||||||
|
// TODO tell the viewer to remove the root folder's content
|
||||||
|
if (client is IClientCore)
|
||||||
|
{
|
||||||
|
IClientCore core = (IClientCore)client;
|
||||||
|
IClientInventory inv;
|
||||||
|
|
||||||
|
if (core.TryGet<IClientInventory>(out inv))
|
||||||
|
{
|
||||||
|
InventoryFolderBase root = m_Scenes[0].InventoryService.GetRootFolder(client.AgentId);
|
||||||
|
if (root != null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Removing root inventory");
|
||||||
|
InventoryCollection content = m_Scenes[0].InventoryService.GetFolderContent(client.AgentId, root.ID);
|
||||||
|
UUID[] ids = new UUID[content.Folders.Count];
|
||||||
|
int i = 0;
|
||||||
|
foreach (InventoryFolderBase f in content.Folders)
|
||||||
|
ids[i++] = f.ID;
|
||||||
|
inv.SendRemoveInventoryFolders(ids);
|
||||||
|
ids = new UUID[content.Items.Count];
|
||||||
|
i = 0;
|
||||||
|
foreach (InventoryItemBase it in content.Items)
|
||||||
|
ids[i++] = it.ID;
|
||||||
|
inv.SendRemoveInventoryItems(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RestoreRootFolderContents(IClientAPI client)
|
||||||
|
{
|
||||||
|
// Restore the user's inventory, because we removed it earlier on
|
||||||
|
InventoryFolderBase root = m_Scenes[0].InventoryService.GetRootFolder(client.AgentId);
|
||||||
|
if (root != null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Restoring root inventory");
|
||||||
|
client.SendBulkUpdateInventory(root);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private GridRegion MakeRegion(AgentCircuitData aCircuit)
|
private GridRegion MakeRegion(AgentCircuitData aCircuit)
|
||||||
{
|
{
|
||||||
GridRegion region = new GridRegion();
|
GridRegion region = new GridRegion();
|
||||||
|
|
|
@ -297,6 +297,35 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
|
|
||||||
#region IUserManagement
|
#region IUserManagement
|
||||||
|
|
||||||
|
public UUID GetUserIdByName(string name)
|
||||||
|
{
|
||||||
|
string[] parts = name.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
if (parts.Length < 2)
|
||||||
|
throw new Exception("Name must have 2 components");
|
||||||
|
|
||||||
|
return GetUserIdByName(parts[0], parts[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UUID GetUserIdByName(string firstName, string lastName)
|
||||||
|
{
|
||||||
|
// TODO: Optimize for reverse lookup if this gets used by non-console commands.
|
||||||
|
lock (m_UserCache)
|
||||||
|
{
|
||||||
|
foreach (UserData user in m_UserCache.Values)
|
||||||
|
{
|
||||||
|
if (user.FirstName == firstName && user.LastName == lastName)
|
||||||
|
return user.Id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(UUID.Zero, firstName, lastName);
|
||||||
|
|
||||||
|
if (account != null)
|
||||||
|
return account.PrincipalID;
|
||||||
|
|
||||||
|
return UUID.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
public string GetUserName(UUID uuid)
|
public string GetUserName(UUID uuid)
|
||||||
{
|
{
|
||||||
string[] names = GetUserNames(uuid);
|
string[] names = GetUserNames(uuid);
|
||||||
|
|
|
@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
||||||
|
|
||||||
public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
|
public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
|
||||||
{
|
{
|
||||||
return new List<InventoryFolderBase>();
|
return m_RemoteConnector.GetInventorySkeleton(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InventoryCollection GetUserInventory(UUID userID)
|
public InventoryCollection GetUserInventory(UUID userID)
|
||||||
|
|
|
@ -93,7 +93,9 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
void JoinGroupRequest(IClientAPI remoteClient, UUID GroupID);
|
void JoinGroupRequest(IClientAPI remoteClient, UUID GroupID);
|
||||||
void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID);
|
void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID);
|
||||||
void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID);
|
void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID);
|
||||||
|
void EjectGroupMember(IClientAPI remoteClient, UUID agentID, UUID GroupID, UUID EjecteeID);
|
||||||
void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID);
|
void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID);
|
||||||
|
void InviteGroup(IClientAPI remoteClient, UUID agentID, UUID GroupID, UUID InviteeID, UUID RoleID);
|
||||||
void NotifyChange(UUID GroupID);
|
void NotifyChange(UUID GroupID);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,6 +15,21 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
string GetUserUUI(UUID uuid);
|
string GetUserUUI(UUID uuid);
|
||||||
string GetUserServerURL(UUID uuid, string serverType);
|
string GetUserServerURL(UUID uuid, string serverType);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get user ID by the given name.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
/// <returns>UUID.Zero if no user with that name is found or if the name is "Unknown User"</returns>
|
||||||
|
UUID GetUserIdByName(string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get user ID by the given name.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="firstName"></param>
|
||||||
|
/// <param name="lastName"></param>
|
||||||
|
/// <returns>UUID.Zero if no user with that name is found or if the name is "Unknown User"</returns>
|
||||||
|
UUID GetUserIdByName(string firstName, string lastName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a user.
|
/// Add a user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -72,9 +72,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public delegate void OnNewClientDelegate(IClientAPI client);
|
public delegate void OnNewClientDelegate(IClientAPI client);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deprecated in favour of OnClientConnect.
|
/// Triggered when a new client is added to the scene.
|
||||||
/// Will be marked Obsolete after IClientCore has 100% of IClientAPI interfaces.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Triggered before OnClientLogin.
|
||||||
|
/// </remarks>
|
||||||
public event OnNewClientDelegate OnNewClient;
|
public event OnNewClientDelegate OnNewClient;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -192,6 +194,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public delegate void ClientClosed(UUID clientID, Scene scene);
|
public delegate void ClientClosed(UUID clientID, Scene scene);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fired when a client is removed from a scene.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// At the point of firing, the scene still contains the client's scene presence.
|
||||||
|
/// </remarks>
|
||||||
public event ClientClosed OnClientClosed;
|
public event ClientClosed OnClientClosed;
|
||||||
|
|
||||||
public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
|
public delegate void NewScript(UUID clientID, SceneObjectPart part, UUID itemID);
|
||||||
|
|
|
@ -1881,8 +1881,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
foreach (SceneObjectGroup group in PrimsFromDB)
|
foreach (SceneObjectGroup group in PrimsFromDB)
|
||||||
{
|
{
|
||||||
EventManager.TriggerOnSceneObjectLoaded(group);
|
|
||||||
AddRestoredSceneObject(group, true, true);
|
AddRestoredSceneObject(group, true, true);
|
||||||
|
EventManager.TriggerOnSceneObjectLoaded(group);
|
||||||
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
|
||||||
rootPart.Flags &= ~PrimFlags.Scripted;
|
rootPart.Flags &= ~PrimFlags.Scripted;
|
||||||
rootPart.TrimPermissions();
|
rootPart.TrimPermissions();
|
||||||
|
@ -2800,14 +2800,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Cache the user's name
|
// Cache the user's name
|
||||||
CacheUserName(sp, aCircuit);
|
CacheUserName(sp, aCircuit);
|
||||||
|
|
||||||
// Let's send the Suitcase folder for incoming HG agents
|
|
||||||
if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
|
||||||
{
|
|
||||||
m_log.DebugFormat("[SCENE]: Sending root folder to viewer...");
|
|
||||||
InventoryFolderBase suitcase = InventoryService.GetRootFolder(client.AgentId);
|
|
||||||
client.SendBulkUpdateInventory(suitcase);
|
|
||||||
}
|
|
||||||
|
|
||||||
EventManager.TriggerOnNewClient(client);
|
EventManager.TriggerOnNewClient(client);
|
||||||
if (vialogin)
|
if (vialogin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Reflection;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using Nini.Config;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
@ -1236,6 +1237,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
|
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HACK HACK -- just seeing how the viewer responds
|
||||||
|
// Let's send the Suitcase or the real root folder folder for incoming HG agents
|
||||||
|
// Visiting agents get their suitcase contents; incoming local users get their real root folder's content
|
||||||
|
AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(UUID);
|
||||||
|
if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
||||||
|
{
|
||||||
|
// HACK FOR NOW. JUST TESTING, SO KEEPING EVERYONE ELSE OUT OF THESE TESTS
|
||||||
|
IConfig config = m_scene.Config.Configs["HGEntityTransferModule"];
|
||||||
|
if (config != null && config.GetBoolean("RestrictInventoryAccessAbroad", false))
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[SCENE]: Sending root folder to viewer...");
|
||||||
|
InventoryFolderBase root = m_scene.InventoryService.GetRootFolder(client.AgentId);
|
||||||
|
//InventoryCollection rootContents = InventoryService.GetFolderContent(client.AgentId, root.ID);
|
||||||
|
client.SendBulkUpdateInventory(root);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
||||||
// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
||||||
|
|
|
@ -221,15 +221,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to indicate that the module has been added to the region
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_pluginEnabled)
|
if (m_pluginEnabled)
|
||||||
{
|
{
|
||||||
lock (vlock)
|
lock (vlock)
|
||||||
{
|
{
|
||||||
|
|
||||||
string channelId;
|
string channelId;
|
||||||
|
|
||||||
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
||||||
|
@ -273,23 +270,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create a dictionary entry unconditionally. This eliminates the
|
// Create a dictionary entry unconditionally. This eliminates the
|
||||||
// need to check for a parent in the core code. The end result is
|
// need to check for a parent in the core code. The end result is
|
||||||
// the same, if the parent table entry is an empty string, then
|
// the same, if the parent table entry is an empty string, then
|
||||||
// region channels will be created as first-level channels.
|
// region channels will be created as first-level channels.
|
||||||
|
lock (m_parents)
|
||||||
lock (m_parents)
|
{
|
||||||
if (m_parents.ContainsKey(sceneUUID))
|
if (m_parents.ContainsKey(sceneUUID))
|
||||||
{
|
{
|
||||||
RemoveRegion(scene);
|
RemoveRegion(scene);
|
||||||
m_parents.Add(sceneUUID, channelId);
|
m_parents.Add(sceneUUID, channelId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_parents.Add(sceneUUID, channelId);
|
m_parents.Add(sceneUUID, channelId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need to capture scene in an anonymous method
|
// we need to capture scene in an anonymous method
|
||||||
|
@ -298,26 +294,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
{
|
{
|
||||||
OnRegisterCaps(scene, agentID, caps);
|
OnRegisterCaps(scene, agentID, caps);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to indicate that all loadable modules have now been added
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
{
|
{
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called to indicate that the region is going away.
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_pluginEnabled)
|
if (m_pluginEnabled)
|
||||||
{
|
{
|
||||||
lock (vlock)
|
lock (vlock)
|
||||||
{
|
{
|
||||||
|
|
||||||
string channelId;
|
string channelId;
|
||||||
|
|
||||||
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
string sceneUUID = scene.RegionInfo.RegionID.ToString();
|
||||||
|
@ -328,10 +318,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// iteration over the set of chidren identified.
|
// iteration over the set of chidren identified.
|
||||||
// This assumes that there is just one directory per
|
// This assumes that there is just one directory per
|
||||||
// region.
|
// region.
|
||||||
|
|
||||||
if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
|
if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
|
||||||
{
|
{
|
||||||
|
|
||||||
m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
|
m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
|
||||||
sceneName, sceneUUID, channelId);
|
sceneName, sceneUUID, channelId);
|
||||||
|
|
||||||
|
@ -360,7 +348,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
|
|
||||||
lock (m_parents)
|
lock (m_parents)
|
||||||
{
|
{
|
||||||
if (m_parents.ContainsKey(sceneUUID))
|
if (m_parents.ContainsKey(sceneUUID))
|
||||||
{
|
{
|
||||||
m_parents.Remove(sceneUUID);
|
m_parents.Remove(sceneUUID);
|
||||||
}
|
}
|
||||||
|
@ -459,11 +447,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
ScenePresence avatar = null;
|
ScenePresence avatar = null;
|
||||||
string avatarName = null;
|
string avatarName = null;
|
||||||
|
|
||||||
if (scene == null) throw new Exception("[VivoxVoice][PROVISIONVOICE] Invalid scene");
|
if (scene == null)
|
||||||
|
throw new Exception("[VivoxVoice][PROVISIONVOICE]: Invalid scene");
|
||||||
|
|
||||||
avatar = scene.GetScenePresence(agentID);
|
avatar = scene.GetScenePresence(agentID);
|
||||||
while (avatar == null)
|
while (avatar == null)
|
||||||
|
@ -566,7 +554,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (retry);
|
}
|
||||||
|
while (retry);
|
||||||
|
|
||||||
if (code != "OK")
|
if (code != "OK")
|
||||||
{
|
{
|
||||||
|
@ -676,7 +665,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Callback for a client request for a private chat channel
|
/// Callback for a client request for a private chat channel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -698,10 +686,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
return "<llsd>true</llsd>";
|
return "<llsd>true</llsd>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private string RegionGetOrCreateChannel(Scene scene, LandData land)
|
private string RegionGetOrCreateChannel(Scene scene, LandData land)
|
||||||
{
|
{
|
||||||
|
|
||||||
string channelUri = null;
|
string channelUri = null;
|
||||||
string channelId = null;
|
string channelId = null;
|
||||||
|
|
||||||
|
@ -709,11 +695,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
string landName;
|
string landName;
|
||||||
string parentId;
|
string parentId;
|
||||||
|
|
||||||
lock (m_parents) parentId = m_parents[scene.RegionInfo.RegionID.ToString()];
|
lock (m_parents)
|
||||||
|
parentId = m_parents[scene.RegionInfo.RegionID.ToString()];
|
||||||
|
|
||||||
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
|
// Create parcel voice channel. If no parcel exists, then the voice channel ID is the same
|
||||||
// as the directory ID. Otherwise, it reflects the parcel's ID.
|
// as the directory ID. Otherwise, it reflects the parcel's ID.
|
||||||
|
|
||||||
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
|
if (land.LocalID != 1 && (land.Flags & (uint)ParcelFlags.UseEstateVoiceChan) == 0)
|
||||||
{
|
{
|
||||||
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
|
landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
|
||||||
|
@ -741,8 +727,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
|
|
||||||
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
|
m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
|
||||||
landName, parentId, channelUri);
|
landName, parentId, channelUri);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return channelUri;
|
return channelUri;
|
||||||
|
@ -761,7 +745,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
return VivoxCall(requrl, false);
|
return VivoxCall(requrl, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
|
private static readonly string m_vivoxLogoutPath = "https://{0}/api2/viv_signout.php?auth_token={1}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -828,7 +811,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
///
|
///
|
||||||
/// In this case the call handles parent and description as optional values.
|
/// In this case the call handles parent and description as optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
|
private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
|
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
|
||||||
|
@ -864,7 +846,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
/// channel name space.
|
/// channel name space.
|
||||||
/// The parent and description are optional values.
|
/// The parent and description are optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool VivoxTryCreateDirectory(string dirId, string description, out string channelId)
|
private bool VivoxTryCreateDirectory(string dirId, string description, out string channelId)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", dirId, m_authToken);
|
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", dirId, m_authToken);
|
||||||
|
@ -901,7 +882,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
/// are required in a later phase.
|
/// are required in a later phase.
|
||||||
/// In this case the call handles parent and description as optional values.
|
/// In this case the call handles parent and description as optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool VivoxTryGetChannel(string channelParent, string channelName,
|
private bool VivoxTryGetChannel(string channelParent, string channelName,
|
||||||
out string channelId, out string channelUri)
|
out string channelId, out string channelUri)
|
||||||
{
|
{
|
||||||
|
@ -1044,6 +1024,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
// return VivoxCall(requrl, true);
|
// return VivoxCall(requrl, true);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete a channel.
|
/// Delete a channel.
|
||||||
/// Once again, there a multitude of options possible. In the simplest case
|
/// Once again, there a multitude of options possible. In the simplest case
|
||||||
|
@ -1056,8 +1038,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
/// In this case the call handles parent and description as optional values.
|
/// In this case the call handles parent and description as optional values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private static readonly string m_vivoxChannelDel = "https://{0}/api2/viv_chan_mod.php?mode={1}&chan_id={2}&auth_token={3}";
|
|
||||||
|
|
||||||
private XmlElement VivoxDeleteChannel(string parent, string channelid)
|
private XmlElement VivoxDeleteChannel(string parent, string channelid)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
|
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
|
||||||
|
@ -1068,12 +1048,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
return VivoxCall(requrl, true);
|
return VivoxCall(requrl, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return information on channels in the given directory
|
/// Return information on channels in the given directory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private static readonly string m_vivoxChannelSearch = "https://{0}/api2/viv_chan_search.php?&cond_chanparent={1}&auth_token={2}";
|
|
||||||
|
|
||||||
private XmlElement VivoxListChildren(string channelid)
|
private XmlElement VivoxListChildren(string channelid)
|
||||||
{
|
{
|
||||||
string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken);
|
string requrl = String.Format(m_vivoxChannelSearch, m_vivoxServer, channelid, m_authToken);
|
||||||
|
@ -1118,7 +1098,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
/// The outcome of the call can be determined by examining the
|
/// The outcome of the call can be determined by examining the
|
||||||
/// status value in the hash table.
|
/// status value in the hash table.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private XmlElement VivoxCall(string requrl, bool admin)
|
private XmlElement VivoxCall(string requrl, bool admin)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1164,7 +1143,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Just say if it worked.
|
/// Just say if it worked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
private bool IsOK(XmlElement resp)
|
private bool IsOK(XmlElement resp)
|
||||||
{
|
{
|
||||||
string status;
|
string status;
|
||||||
|
|
|
@ -84,6 +84,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
private bool m_groupsEnabled = false;
|
private bool m_groupsEnabled = false;
|
||||||
private bool m_groupNoticesEnabled = true;
|
private bool m_groupNoticesEnabled = true;
|
||||||
private bool m_debugEnabled = false;
|
private bool m_debugEnabled = false;
|
||||||
|
private int m_levelGroupCreate = 0;
|
||||||
|
|
||||||
#region IRegionModuleBase Members
|
#region IRegionModuleBase Members
|
||||||
|
|
||||||
|
@ -115,6 +116,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
m_groupNoticesEnabled = groupsConfig.GetBoolean("NoticesEnabled", true);
|
m_groupNoticesEnabled = groupsConfig.GetBoolean("NoticesEnabled", true);
|
||||||
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", false);
|
m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", false);
|
||||||
|
m_levelGroupCreate = groupsConfig.GetInt("LevelGroupCreate", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,13 +710,29 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
remoteClient.SendCreateGroupReply(UUID.Zero, false, "A group with the same name already exists.");
|
remoteClient.SendCreateGroupReply(UUID.Zero, false, "A group with the same name already exists.");
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check user level
|
||||||
|
ScenePresence avatar = null;
|
||||||
|
Scene scene = (Scene)remoteClient.Scene;
|
||||||
|
scene.TryGetScenePresence(remoteClient.AgentId, out avatar);
|
||||||
|
|
||||||
|
if (avatar != null)
|
||||||
|
{
|
||||||
|
if (avatar.UserLevel < m_levelGroupCreate)
|
||||||
|
{
|
||||||
|
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got insufficient permissions to create a group.");
|
||||||
|
return UUID.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// check funds
|
||||||
// is there is a money module present ?
|
// is there is a money module present ?
|
||||||
IMoneyModule money = remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
|
IMoneyModule money = scene.RequestModuleInterface<IMoneyModule>();
|
||||||
if (money != null)
|
if (money != null)
|
||||||
{
|
{
|
||||||
// do the transaction, that is if the agent has got sufficient funds
|
// do the transaction, that is if the agent has got sufficient funds
|
||||||
if (!money.AmountCovered(remoteClient.AgentId, money.GroupCreationCharge)) {
|
if (!money.AmountCovered(remoteClient.AgentId, money.GroupCreationCharge)) {
|
||||||
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got issuficient funds to create a group.");
|
remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have got insufficient funds to create a group.");
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation");
|
money.ApplyCharge(GetRequestingAgentID(remoteClient), money.GroupCreationCharge, "Group Creation");
|
||||||
|
@ -938,18 +956,56 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EjectGroupMemberRequest(IClientAPI remoteClient, UUID groupID, UUID ejecteeID)
|
public void EjectGroupMemberRequest(IClientAPI remoteClient, UUID groupID, UUID ejecteeID)
|
||||||
|
{
|
||||||
|
EjectGroupMember(remoteClient, GetRequestingAgentID(remoteClient), groupID, ejecteeID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EjectGroupMember(IClientAPI remoteClient, UUID agentID, UUID groupID, UUID ejecteeID)
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
||||||
|
|
||||||
// Todo: Security check?
|
// Todo: Security check?
|
||||||
m_groupData.RemoveAgentFromGroup(GetRequestingAgentID(remoteClient), ejecteeID, groupID);
|
m_groupData.RemoveAgentFromGroup(agentID, ejecteeID, groupID);
|
||||||
|
|
||||||
remoteClient.SendEjectGroupMemberReply(GetRequestingAgentID(remoteClient), groupID, true);
|
string agentName;
|
||||||
|
RegionInfo regionInfo;
|
||||||
|
|
||||||
GroupRecord groupInfo = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), groupID, null);
|
// remoteClient provided or just agentID?
|
||||||
|
if (remoteClient != null)
|
||||||
|
{
|
||||||
|
agentName = remoteClient.Name;
|
||||||
|
regionInfo = remoteClient.Scene.RegionInfo;
|
||||||
|
remoteClient.SendEjectGroupMemberReply(agentID, groupID, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IClientAPI client = GetActiveClient(agentID);
|
||||||
|
|
||||||
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, ejecteeID);
|
if (client != null)
|
||||||
|
{
|
||||||
|
agentName = client.Name;
|
||||||
|
regionInfo = client.Scene.RegionInfo;
|
||||||
|
client.SendEjectGroupMemberReply(agentID, groupID, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
regionInfo = m_sceneList[0].RegionInfo;
|
||||||
|
UserAccount acc = m_sceneList[0].UserAccountService.GetUserAccount(regionInfo.ScopeID, agentID);
|
||||||
|
|
||||||
|
if (acc != null)
|
||||||
|
{
|
||||||
|
agentName = acc.FirstName + " " + acc.LastName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
agentName = "Unknown member";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null);
|
||||||
|
|
||||||
|
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(regionInfo.ScopeID, ejecteeID);
|
||||||
if ((groupInfo == null) || (account == null))
|
if ((groupInfo == null) || (account == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -959,23 +1015,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
GridInstantMessage msg = new GridInstantMessage();
|
GridInstantMessage msg = new GridInstantMessage();
|
||||||
|
|
||||||
msg.imSessionID = UUID.Zero.Guid;
|
msg.imSessionID = UUID.Zero.Guid;
|
||||||
msg.fromAgentID = GetRequestingAgentID(remoteClient).Guid;
|
msg.fromAgentID = agentID.Guid;
|
||||||
// msg.fromAgentID = info.GroupID;
|
// msg.fromAgentID = info.GroupID;
|
||||||
msg.toAgentID = ejecteeID.Guid;
|
msg.toAgentID = ejecteeID.Guid;
|
||||||
//msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
|
//msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
|
||||||
msg.timestamp = 0;
|
msg.timestamp = 0;
|
||||||
msg.fromAgentName = remoteClient.Name;
|
msg.fromAgentName = agentName;
|
||||||
msg.message = string.Format("You have been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName);
|
msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName);
|
||||||
msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.MessageFromAgent;
|
msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.MessageFromAgent;
|
||||||
msg.fromGroup = false;
|
msg.fromGroup = false;
|
||||||
msg.offline = (byte)0;
|
msg.offline = (byte)0;
|
||||||
msg.ParentEstateID = 0;
|
msg.ParentEstateID = 0;
|
||||||
msg.Position = Vector3.Zero;
|
msg.Position = Vector3.Zero;
|
||||||
msg.RegionID = remoteClient.Scene.RegionInfo.RegionID.Guid;
|
msg.RegionID = regionInfo.RegionID.Guid;
|
||||||
msg.binaryBucket = new byte[0];
|
msg.binaryBucket = new byte[0];
|
||||||
OutgoingInstantMessage(msg, ejecteeID);
|
OutgoingInstantMessage(msg, ejecteeID);
|
||||||
|
|
||||||
|
|
||||||
// Message to ejector
|
// Message to ejector
|
||||||
// Interop, received special 210 code for ejecting a group member
|
// Interop, received special 210 code for ejecting a group member
|
||||||
// this only works within the comms servers domain, and won't work hypergrid
|
// this only works within the comms servers domain, and won't work hypergrid
|
||||||
|
@ -985,26 +1040,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
msg = new GridInstantMessage();
|
msg = new GridInstantMessage();
|
||||||
msg.imSessionID = UUID.Zero.Guid;
|
msg.imSessionID = UUID.Zero.Guid;
|
||||||
msg.fromAgentID = GetRequestingAgentID(remoteClient).Guid;
|
msg.fromAgentID = agentID.Guid;
|
||||||
msg.toAgentID = GetRequestingAgentID(remoteClient).Guid;
|
msg.toAgentID = agentID.Guid;
|
||||||
msg.timestamp = 0;
|
msg.timestamp = 0;
|
||||||
msg.fromAgentName = remoteClient.Name;
|
msg.fromAgentName = agentName;
|
||||||
if (account != null)
|
if (account != null)
|
||||||
{
|
{
|
||||||
msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, account.FirstName + " " + account.LastName);
|
msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName, account.FirstName + " " + account.LastName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", remoteClient.Name, groupInfo.GroupName, "Unknown member");
|
msg.message = string.Format("{2} has been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName, "Unknown member");
|
||||||
}
|
}
|
||||||
msg.dialog = (byte)210; //interop
|
msg.dialog = (byte)210; //interop
|
||||||
msg.fromGroup = false;
|
msg.fromGroup = false;
|
||||||
msg.offline = (byte)0;
|
msg.offline = (byte)0;
|
||||||
msg.ParentEstateID = 0;
|
msg.ParentEstateID = 0;
|
||||||
msg.Position = Vector3.Zero;
|
msg.Position = Vector3.Zero;
|
||||||
msg.RegionID = remoteClient.Scene.RegionInfo.RegionID.Guid;
|
msg.RegionID = regionInfo.RegionID.Guid;
|
||||||
msg.binaryBucket = new byte[0];
|
msg.binaryBucket = new byte[0];
|
||||||
OutgoingInstantMessage(msg, GetRequestingAgentID(remoteClient));
|
OutgoingInstantMessage(msg, agentID);
|
||||||
|
|
||||||
|
|
||||||
// SL sends out messages to everyone in the group
|
// SL sends out messages to everyone in the group
|
||||||
|
@ -1013,17 +1068,56 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
|
public void InviteGroupRequest(IClientAPI remoteClient, UUID groupID, UUID invitedAgentID, UUID roleID)
|
||||||
|
{
|
||||||
|
InviteGroup(remoteClient, GetRequestingAgentID(remoteClient), groupID, invitedAgentID, roleID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InviteGroup(IClientAPI remoteClient, UUID agentID, UUID groupID, UUID invitedAgentID, UUID roleID)
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
||||||
|
string agentName;
|
||||||
|
RegionInfo regionInfo;
|
||||||
|
|
||||||
|
// remoteClient provided or just agentID?
|
||||||
|
if (remoteClient != null)
|
||||||
|
{
|
||||||
|
agentName = remoteClient.Name;
|
||||||
|
regionInfo = remoteClient.Scene.RegionInfo;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IClientAPI client = GetActiveClient(agentID);
|
||||||
|
|
||||||
|
if (client != null)
|
||||||
|
{
|
||||||
|
agentName = client.Name;
|
||||||
|
regionInfo = client.Scene.RegionInfo;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
regionInfo = m_sceneList[0].RegionInfo;
|
||||||
|
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(regionInfo.ScopeID, agentID);
|
||||||
|
|
||||||
|
if (account != null)
|
||||||
|
{
|
||||||
|
agentName = account.FirstName + " " + account.LastName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
agentName = "Unknown member";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Todo: Security check, probably also want to send some kind of notification
|
// Todo: Security check, probably also want to send some kind of notification
|
||||||
UUID InviteID = UUID.Random();
|
UUID InviteID = UUID.Random();
|
||||||
|
|
||||||
m_groupData.AddAgentToGroupInvite(GetRequestingAgentID(remoteClient), InviteID, groupID, roleID, invitedAgentID);
|
m_groupData.AddAgentToGroupInvite(agentID, InviteID, groupID, roleID, invitedAgentID);
|
||||||
|
|
||||||
// Check to see if the invite went through, if it did not then it's possible
|
// Check to see if the invite went through, if it did not then it's possible
|
||||||
// the remoteClient did not validate or did not have permission to invite.
|
// the remoteClient did not validate or did not have permission to invite.
|
||||||
GroupInviteInfo inviteInfo = m_groupData.GetAgentToGroupInvite(GetRequestingAgentID(remoteClient), InviteID);
|
GroupInviteInfo inviteInfo = m_groupData.GetAgentToGroupInvite(agentID, InviteID);
|
||||||
|
|
||||||
if (inviteInfo != null)
|
if (inviteInfo != null)
|
||||||
{
|
{
|
||||||
|
@ -1035,19 +1129,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
msg.imSessionID = inviteUUID;
|
msg.imSessionID = inviteUUID;
|
||||||
|
|
||||||
// msg.fromAgentID = GetRequestingAgentID(remoteClient).Guid;
|
// msg.fromAgentID = agentID.Guid;
|
||||||
msg.fromAgentID = groupID.Guid;
|
msg.fromAgentID = groupID.Guid;
|
||||||
msg.toAgentID = invitedAgentID.Guid;
|
msg.toAgentID = invitedAgentID.Guid;
|
||||||
//msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
|
//msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
|
||||||
msg.timestamp = 0;
|
msg.timestamp = 0;
|
||||||
msg.fromAgentName = remoteClient.Name;
|
msg.fromAgentName = agentName;
|
||||||
msg.message = string.Format("{0} has invited you to join a group. There is no cost to join this group.", remoteClient.Name);
|
msg.message = string.Format("{0} has invited you to join a group. There is no cost to join this group.", agentName);
|
||||||
msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupInvitation;
|
msg.dialog = (byte)OpenMetaverse.InstantMessageDialog.GroupInvitation;
|
||||||
msg.fromGroup = true;
|
msg.fromGroup = true;
|
||||||
msg.offline = (byte)0;
|
msg.offline = (byte)0;
|
||||||
msg.ParentEstateID = 0;
|
msg.ParentEstateID = 0;
|
||||||
msg.Position = Vector3.Zero;
|
msg.Position = Vector3.Zero;
|
||||||
msg.RegionID = remoteClient.Scene.RegionInfo.RegionID.Guid;
|
msg.RegionID = regionInfo.RegionID.Guid;
|
||||||
msg.binaryBucket = new byte[20];
|
msg.binaryBucket = new byte[20];
|
||||||
|
|
||||||
OutgoingInstantMessage(msg, invitedAgentID);
|
OutgoingInstantMessage(msg, invitedAgentID);
|
||||||
|
|
|
@ -3026,5 +3026,74 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invite user to the group this object is set to
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="agentId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public LSL_Integer osInviteToGroup(LSL_Key agentId)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.VeryLow, "osInviteToGroup");
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
UUID agent = new UUID(agentId);
|
||||||
|
|
||||||
|
// groups module is required
|
||||||
|
IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface<IGroupsModule>();
|
||||||
|
if (groupsModule == null) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// object has to be set to a group, but not group owned
|
||||||
|
if (m_host.GroupID == UUID.Zero || m_host.GroupID == m_host.OwnerID) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// object owner has to be in that group and required permissions
|
||||||
|
GroupMembershipData member = groupsModule.GetMembershipData(m_host.GroupID, m_host.OwnerID);
|
||||||
|
if (member == null || (member.GroupPowers & (ulong)GroupPowers.Invite) == 0) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// check if agent is in that group already
|
||||||
|
//member = groupsModule.GetMembershipData(agent, m_host.GroupID, agent);
|
||||||
|
//if (member != null) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// invited agent has to be present in this scene
|
||||||
|
if (World.GetScenePresence(agent) == null) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
groupsModule.InviteGroup(null, m_host.OwnerID, m_host.GroupID, agent, UUID.Zero);
|
||||||
|
|
||||||
|
return ScriptBaseClass.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eject user from the group this object is set to
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="agentId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public LSL_Integer osEjectFromGroup(LSL_Key agentId)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.VeryLow, "osEjectFromGroup");
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
UUID agent = new UUID(agentId);
|
||||||
|
|
||||||
|
// groups module is required
|
||||||
|
IGroupsModule groupsModule = m_ScriptEngine.World.RequestModuleInterface<IGroupsModule>();
|
||||||
|
if (groupsModule == null) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// object has to be set to a group, but not group owned
|
||||||
|
if (m_host.GroupID == UUID.Zero || m_host.GroupID == m_host.OwnerID) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// object owner has to be in that group and required permissions
|
||||||
|
GroupMembershipData member = groupsModule.GetMembershipData(m_host.GroupID, m_host.OwnerID);
|
||||||
|
if (member == null || (member.GroupPowers & (ulong)GroupPowers.Eject) == 0) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// agent has to be in that group
|
||||||
|
//member = groupsModule.GetMembershipData(agent, m_host.GroupID, agent);
|
||||||
|
//if (member == null) return ScriptBaseClass.FALSE;
|
||||||
|
|
||||||
|
// ejectee can be offline
|
||||||
|
|
||||||
|
groupsModule.EjectGroupMember(null, m_host.OwnerID, m_host.GroupID, agent);
|
||||||
|
|
||||||
|
return ScriptBaseClass.TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,5 +231,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_String osUnixTimeToTimestamp(long time);
|
LSL_String osUnixTimeToTimestamp(long time);
|
||||||
|
|
||||||
LSL_String osGetInventoryDesc(string item);
|
LSL_String osGetInventoryDesc(string item);
|
||||||
|
|
||||||
|
LSL_Integer osInviteToGroup(LSL_Key agentId);
|
||||||
|
LSL_Integer osEjectFromGroup(LSL_Key agentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -868,5 +868,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osGetInventoryDesc(item);
|
return m_OSSL_Functions.osGetInventoryDesc(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer osInviteToGroup(LSL_Key agentId)
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osInviteToGroup(agentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer osEjectFromGroup(LSL_Key agentId)
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osEjectFromGroup(agentId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
protected string m_AllowedClients = string.Empty;
|
protected string m_AllowedClients = string.Empty;
|
||||||
protected string m_DeniedClients = string.Empty;
|
protected string m_DeniedClients = string.Empty;
|
||||||
|
private static bool m_ForeignAgentsAllowed = true;
|
||||||
|
|
||||||
private static UUID m_ScopeID;
|
private static UUID m_ScopeID;
|
||||||
private static bool m_AllowTeleportsToAnyRegion;
|
private static bool m_AllowTeleportsToAnyRegion;
|
||||||
|
@ -110,6 +111,7 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty);
|
m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty);
|
||||||
m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty);
|
m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty);
|
||||||
|
m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
|
||||||
|
|
||||||
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
|
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
|
||||||
throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
|
throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
|
||||||
|
@ -257,6 +259,17 @@ namespace OpenSim.Services.HypergridService
|
||||||
}
|
}
|
||||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok");
|
m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok");
|
||||||
|
|
||||||
|
//
|
||||||
|
// Foreign agents allowed
|
||||||
|
//
|
||||||
|
if (account == null && !m_ForeignAgentsAllowed)
|
||||||
|
{
|
||||||
|
reason = "Unauthorized";
|
||||||
|
m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1}. Refusing service.",
|
||||||
|
aCircuit.firstname, aCircuit.lastname);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// May want to authorize
|
// May want to authorize
|
||||||
|
|
||||||
bool isFirstLogin = false;
|
bool isFirstLogin = false;
|
||||||
|
|
|
@ -53,8 +53,6 @@ namespace OpenSim.Services.HypergridService
|
||||||
LogManager.GetLogger(
|
LogManager.GetLogger(
|
||||||
MethodBase.GetCurrentMethod().DeclaringType);
|
MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected new IXInventoryData m_Database;
|
|
||||||
|
|
||||||
private string m_HomeURL;
|
private string m_HomeURL;
|
||||||
private IUserAccountService m_UserAccountService;
|
private IUserAccountService m_UserAccountService;
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,8 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
protected static string m_GridName;
|
protected static string m_GridName;
|
||||||
|
|
||||||
|
protected static int m_LevelOutsideContacts;
|
||||||
|
|
||||||
protected static bool m_BypassClientVerification;
|
protected static bool m_BypassClientVerification;
|
||||||
|
|
||||||
public UserAgentService(IConfigSource config) : this(config, null)
|
public UserAgentService(IConfigSource config) : this(config, null)
|
||||||
|
@ -127,6 +129,8 @@ namespace OpenSim.Services.HypergridService
|
||||||
}
|
}
|
||||||
if (!m_GridName.EndsWith("/"))
|
if (!m_GridName.EndsWith("/"))
|
||||||
m_GridName = m_GridName + "/";
|
m_GridName = m_GridName + "/";
|
||||||
|
|
||||||
|
m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,10 +573,16 @@ namespace OpenSim.Services.HypergridService
|
||||||
|
|
||||||
public UUID GetUUID(String first, String last)
|
public UUID GetUUID(String first, String last)
|
||||||
{
|
{
|
||||||
// Let's see if it's a local user
|
// Let's see if it's a local user
|
||||||
UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last);
|
UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last);
|
||||||
if (account != null)
|
if (account != null)
|
||||||
return account.PrincipalID;
|
{
|
||||||
|
// check user level
|
||||||
|
if (account.UserLevel < m_LevelOutsideContacts)
|
||||||
|
return UUID.Zero;
|
||||||
|
else
|
||||||
|
return account.PrincipalID;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,7 +318,7 @@ namespace OpenSim.Services.InventoryService
|
||||||
|
|
||||||
if (check.Type != -1 || xFolder.type != -1)
|
if (check.Type != -1 || xFolder.type != -1)
|
||||||
{
|
{
|
||||||
if (xFolder.version > check.Version)
|
if (xFolder.version < check.Version)
|
||||||
return false;
|
return false;
|
||||||
check.Version = (ushort)xFolder.version;
|
check.Version = (ushort)xFolder.version;
|
||||||
xFolder = ConvertFromOpenSim(check);
|
xFolder = ConvertFromOpenSim(check);
|
||||||
|
|
|
@ -272,6 +272,8 @@
|
||||||
; Disabled by default
|
; Disabled by default
|
||||||
; simple_build_permissions = False
|
; simple_build_permissions = False
|
||||||
|
|
||||||
|
; Minimum user level required to upload assets
|
||||||
|
;LevelUpload = 0
|
||||||
|
|
||||||
; ##
|
; ##
|
||||||
; ## SCRIPT ENGINE
|
; ## SCRIPT ENGINE
|
||||||
|
@ -620,6 +622,10 @@
|
||||||
; This is set to 4095 because current viewers can't handle teleports that are greater than this distance
|
; This is set to 4095 because current viewers can't handle teleports that are greater than this distance
|
||||||
max_distance = 4095
|
max_distance = 4095
|
||||||
|
|
||||||
|
; Minimum user level required for HyperGrid teleports
|
||||||
|
LevelHGTeleport = 0
|
||||||
|
|
||||||
|
|
||||||
[Messaging]
|
[Messaging]
|
||||||
; Control which region module is used for instant messaging.
|
; Control which region module is used for instant messaging.
|
||||||
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)
|
; Default is InstantMessageModule (this is the name of the core IM module as well as the setting)
|
||||||
|
@ -657,6 +663,9 @@
|
||||||
; mesh, and use it for collisions.
|
; mesh, and use it for collisions.
|
||||||
UseMeshiesPhysicsMesh = true
|
UseMeshiesPhysicsMesh = true
|
||||||
|
|
||||||
|
; Minimum user level required to upload meshes
|
||||||
|
;LevelUpload = 0
|
||||||
|
|
||||||
|
|
||||||
[ODEPhysicsSettings]
|
[ODEPhysicsSettings]
|
||||||
;##
|
;##
|
||||||
|
@ -1497,6 +1506,9 @@
|
||||||
; System.Net.WebException: The request was aborted: The request was canceled.
|
; System.Net.WebException: The request was aborted: The request was canceled.
|
||||||
; XmlRpcDisableKeepAlive = false
|
; XmlRpcDisableKeepAlive = false
|
||||||
|
|
||||||
|
; Minimum user level required to create groups
|
||||||
|
;LevelGroupCreate = 0
|
||||||
|
|
||||||
|
|
||||||
[PacketPool]
|
[PacketPool]
|
||||||
; Enables the experimental packet pool. Yes, we've been here before.
|
; Enables the experimental packet pool. Yes, we've been here before.
|
||||||
|
|
|
@ -373,6 +373,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
;; the IP address of the machine where your LoginService is
|
;; the IP address of the machine where your LoginService is
|
||||||
;LoginServerIP = "127.0.0.1"
|
;LoginServerIP = "127.0.0.1"
|
||||||
|
|
||||||
|
; User level required to be contacted from other grids
|
||||||
|
;LevelOutsideContacts = 0
|
||||||
|
|
||||||
; * The interface that local users get when they are in other grids.
|
; * The interface that local users get when they are in other grids.
|
||||||
; * This restricts the inventory operations while in other grids.
|
; * This restricts the inventory operations while in other grids.
|
||||||
; * Still not completely safe, especially if users perform inventory operations
|
; * Still not completely safe, especially if users perform inventory operations
|
||||||
|
|
|
@ -147,6 +147,9 @@
|
||||||
;AllowedClients = ""
|
;AllowedClients = ""
|
||||||
;DeniedClients = ""
|
;DeniedClients = ""
|
||||||
|
|
||||||
|
;; Are foreign visitors allowed
|
||||||
|
;ForeignAgentsAllowed = true
|
||||||
|
|
||||||
[FreeswitchService]
|
[FreeswitchService]
|
||||||
;; If FreeSWITCH is not being used then you don't need to set any of these parameters
|
;; If FreeSWITCH is not being used then you don't need to set any of these parameters
|
||||||
;;
|
;;
|
||||||
|
@ -241,3 +244,7 @@
|
||||||
; DisallowResidents -- only Admins and Managers allowed
|
; DisallowResidents -- only Admins and Managers allowed
|
||||||
; Example:
|
; Example:
|
||||||
; Region_Test_1 = "DisallowForeigners"
|
; Region_Test_1 = "DisallowForeigners"
|
||||||
|
|
||||||
|
[UserAgentService]
|
||||||
|
; User level required to be contacted from other grids
|
||||||
|
;LevelOutsideContacts = 0
|
||||||
|
|
Loading…
Reference in New Issue