give regions a option to block profile web urls, so users are not sent to unknown web sites set by other users

melanie
UbitUmarov 2016-12-15 00:08:36 +00:00
parent 1d6a7d2225
commit 1fd0178e8e
1 changed files with 10 additions and 1 deletions

View File

@ -69,6 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
Dictionary<UUID, int> m_classifiedInterest = new Dictionary<UUID, int>();
private JsonRpcRequestManager rpc = new JsonRpcRequestManager();
private bool m_allowUserProfileWebURLs = true;
public Scene Scene
{
@ -159,7 +160,8 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
Enabled = false;
return;
}
m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs);
m_log.Debug("[PROFILES]: Full Profiles Enabled");
ReplaceableInterface = null;
Enabled = true;
@ -1089,6 +1091,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
if(p != null && !p.IsDeleted)
flags |= 0x10;
if(!m_allowUserProfileWebURLs)
props.WebUrl ="";
remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags,
props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);
@ -1119,6 +1125,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
prop.FirstLifeImageId = newProfile.FirstLifeImage;
prop.FirstLifeText = newProfile.FirstLifeAboutText;
if(!m_allowUserProfileWebURLs)
prop.WebUrl ="";
string serverURI = string.Empty;
GetUserProfileServerURI(remoteClient.AgentId, out serverURI);