OpenSim/Framework/Util.cs
/// <summary>
/// Returns the name of the user's viewer.
/// </summary>
/// <remarks>
/// This method handles two ways that viewers specify their name:
/// 1. Viewer = "Firestorm-Release 4.4.2.34167", Channel = "(don't care)" -> "Firestorm-Release 4.4.2.34167"
/// 2. Viewer = "4.5.1.38838", Channel = "Firestorm-Beta" -> "Firestorm-Beta 4.5.1.38838"
/// </remarks>
Returns the name of the user's viewer.
Returns the name of the user ' s viewer .
public static string GetViewerName(AgentCircuitData agent)
        {
            string name = agent.Viewer;
            if (name == null)
                name = "";
            else
                name = name.Trim();
            foreach (char c in name)
            {
                if (Char.IsLetter(c))
                    return name;
            }
            if ((agent.Channel != null) && (agent.Channel.Length > 0))
                name = agent.Channel.Trim() + " " + name;
            return name;
        }
public static string GetViewerName ( AgentCircuitData agent ) { string name = agent . Viewer ; if ( name == null ) name = " " ; else name = name . Trim ( ) ; foreach ( char c in name ) { if ( Char . IsLetter ( c ) ) return name ; } if ( ( agent . Channel != null ) && ( agent . Channel . Length > 0 ) ) name = agent . Channel . Trim ( ) + " " + name ; return name ; }
Returns the name of the user's viewer.
Returns the name of the user ' s viewer .
// Check if 'Viewer' is just a version number. If it's *not*, then we // assume that it contains the real viewer name, and we return it. // The 'Viewer' string contains just a version number. If there's anything in // 'Channel' then assume that it's the viewer name.
agent
AgentCircuitData
remarks
This method handles two ways that viewers specify their name:
1.
This method handles two ways that viewers specify their name : 1 .