diff options
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llavatarname.cpp | 23 | ||||
| -rw-r--r-- | indra/llmessage/llavatarname.h | 4 | 
2 files changed, 21 insertions, 6 deletions
| diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index d12f157910..d2115ee499 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -166,7 +166,7 @@ void LLAvatarName::setExpires(F64 expires)  	mExpires = LLFrameTimer::getTotalSeconds() + expires;  } -std::string LLAvatarName::getCompleteName() const +std::string LLAvatarName::getCompleteName(bool use_parentheses) const  {  	std::string name;  	if (sUseDisplayNames) @@ -182,7 +182,14 @@ std::string LLAvatarName::getCompleteName() const  			name = mDisplayName;  			if(sUseUsernames)  			{ -				name += " (" + mUsername + ")"; +				if(use_parentheses) +				{ +				    name += " (" + mUsername + ")"; +				} +				else +				{ +				    name += "  [ " + mUsername + " ]"; +				}  			}  		}  	} @@ -220,7 +227,7 @@ std::string LLAvatarName::getDisplayName() const  	}  } -std::string LLAvatarName::getUserName() const +std::string LLAvatarName::getUserName(bool lowercase) const  {  	std::string name;  	if (mLegacyLastName.empty() || (mLegacyLastName == "Resident")) @@ -238,7 +245,15 @@ std::string LLAvatarName::getUserName() const  	}  	else  	{ -		name = mLegacyFirstName + " " + mLegacyLastName; +		if(lowercase) +		{ +		    name = mLegacyFirstName + "." + mLegacyLastName; +		    LLStringUtil::toLower(name); +		} +		else +		{ +		    name = mLegacyFirstName + " " + mLegacyLastName; +	    }  	}  	return name;  } diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 1cb3ae421f..192f43f07c 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -65,7 +65,7 @@ public:  	// For normal names, returns "James Linden (james.linden)"  	// When display names are disabled returns just "James Linden" -	std::string getCompleteName() const; +	std::string getCompleteName(bool use_parentheses = true) const;  	// Returns "James Linden" or "bobsmith123 Resident" for backwards  	// compatibility with systems like voice and muting @@ -80,7 +80,7 @@ public:  	// Returns "James Linden" or "bobsmith123 Resident"  	// Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name  	// Also used for backwards compatibility with systems like voice and muting -	std::string getUserName() const; +	std::string getUserName(bool lowercase = false) const;  	// Returns "james.linden" or the legacy name for very old names  	std::string getAccountName() const { return mUsername; } | 
