Rename charterMember to membershipType to show what it actually is.

This field started out as a simple flag in the protocol to indicate a
user being a SL charter member. It has since then taken on additional
functionality that means that the name is no longer appropriate.
melanie
Melanie Thielker 2016-12-12 11:09:38 +00:00
parent bebfbd0600
commit 1388ac2ef7
8 changed files with 18 additions and 18 deletions

View File

@ -1293,7 +1293,7 @@ namespace OpenSim.Framework
void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
void SendViewerTime(int phase); void SendViewerTime(int phase);
void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType, string flAbout,
uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID); uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question); void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);

View File

@ -2704,7 +2704,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task); OutPacket(packet, ThrottleOutPacketType.Task);
} }
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
UUID partnerID) UUID partnerID)
{ {
@ -2716,7 +2716,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else else
avatarReply.PropertiesData.AboutText = Utils.EmptyBytes; avatarReply.PropertiesData.AboutText = Utils.EmptyBytes;
avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn); avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn);
avatarReply.PropertiesData.CharterMember = charterMember; avatarReply.PropertiesData.CharterMember = membershipType;
if (flAbout != null) if (flAbout != null)
avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout); avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout);
else else

View File

@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
name = account.FirstName + " " + account.LastName; name = account.FirstName + " " + account.LastName;
created = account.Created; created = account.Created;
} }
Byte[] charterMember = Utils.StringToBytes(name); Byte[] membershipType = Utils.StringToBytes(name);
profileUrl = "No profile data"; profileUrl = "No profile data";
aboutText = string.Empty; aboutText = string.Empty;
@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
remoteClient.SendAvatarProperties(avatarID, aboutText, remoteClient.SendAvatarProperties(avatarID, aboutText,
Util.ToDateTime(created).ToString( Util.ToDateTime(created).ToString(
"M/d/yyyy", CultureInfo.InvariantCulture), "M/d/yyyy", CultureInfo.InvariantCulture),
charterMember, firstLifeAboutText, membershipType, firstLifeAboutText,
(uint)(0 & 0xff), (uint)(0 & 0xff),
firstLifeImage, image, profileUrl, partner); firstLifeImage, image, profileUrl, partner);

View File

@ -1032,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
userInfo = new Dictionary<string, object>(); userInfo = new Dictionary<string, object>();
} }
Byte[] charterMember = new Byte[1]; Byte[] membershipType = new Byte[1];
string born = String.Empty; string born = String.Empty;
uint flags = 0x00; uint flags = 0x00;
@ -1040,11 +1040,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
{ {
if (account.UserTitle == "") if (account.UserTitle == "")
{ {
charterMember[0] = (Byte)((account.UserFlags & 0xf00) >> 8); membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
} }
else else
{ {
charterMember = Utils.StringToBytes(account.UserTitle); membershipType = Utils.StringToBytes(account.UserTitle);
} }
born = Util.ToDateTime(account.Created).ToString( born = Util.ToDateTime(account.Created).ToString(
@ -1057,11 +1057,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
{ {
if ((string)userInfo["user_title"] == "") if ((string)userInfo["user_title"] == "")
{ {
charterMember[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
} }
else else
{ {
charterMember = Utils.StringToBytes((string)userInfo["user_title"]); membershipType = Utils.StringToBytes((string)userInfo["user_title"]);
} }
int val_born = (int)userInfo["user_created"]; int val_born = (int)userInfo["user_created"];
@ -1085,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
return; return;
} }
remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags, remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags,
props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);

View File

@ -1247,7 +1247,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
} }
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
{ {
} }

View File

@ -981,7 +981,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{ {
} }
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
UUID partnerID) UUID partnerID)
{ {

View File

@ -308,11 +308,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
about = new OSDMap(0); about = new OSDMap(0);
// Check if this user is a grid operator // Check if this user is a grid operator
byte[] charterMember; byte[] membershipType;
if (user["AccessLevel"].AsInteger() >= 200) if (user["AccessLevel"].AsInteger() >= 200)
charterMember = Utils.StringToBytes("Operator"); membershipType = Utils.StringToBytes("Operator");
else else
charterMember = Utils.EmptyBytes; membershipType = Utils.EmptyBytes;
// Check if the user is online // Check if the user is online
if (client.Scene is Scene) if (client.Scene is Scene)
@ -327,7 +327,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
flags |= ProfileFlags.Identified; flags |= ProfileFlags.Identified;
client.SendAvatarProperties(avatarID, about["About"].AsString(), user["CreationDate"].AsDate().ToString("M/d/yyyy", client.SendAvatarProperties(avatarID, about["About"].AsString(), user["CreationDate"].AsDate().ToString("M/d/yyyy",
System.Globalization.CultureInfo.InvariantCulture), charterMember, about["FLAbout"].AsString(), (uint)flags, System.Globalization.CultureInfo.InvariantCulture), membershipType, about["FLAbout"].AsString(), (uint)flags,
about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID()); about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID());
OSDMap interests = null; OSDMap interests = null;

View File

@ -990,7 +990,7 @@ namespace OpenSim.Tests.Common
{ {
} }
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
UUID partnerID) UUID partnerID)
{ {