Normalize viewer version string to accomodate new style version reporting in the viewers

link-sitting
Latif Khalifa 2013-11-17 13:43:05 +01:00 committed by Justin Clark-Casey (justincc)
parent f94d07f2e2
commit 9ba5a7e190
1 changed files with 24 additions and 1 deletions

View File

@ -128,7 +128,30 @@ namespace OpenSim.Framework
/// <summary>
/// Viewer's version string as reported by the viewer at login
/// </summary>
public string Viewer;
private string ViewerInternal;
/// <summary>
/// Viewer's version string
/// </summary>
public string Viewer
{
set { ViewerInternal = value; }
// Try to return consistent viewer string taking into account
// that viewers have chaagned how version is reported
// See http://opensimulator.org/mantis/view.php?id=6851
get
{
// Old style version string contains viewer name followed by a space followed by a version number
if (ViewerInternal.Contains(" "))
{
return ViewerInternal;
}
else // New style version contains no spaces, just version number
{
return Channel + " " + ViewerInternal;
}
}
}
/// <summary>
/// The channel strinf sent by the viewer at login