Trim search queries (for users, groups, etc.). I have found that sometimes the viewer adds a space at the end, which causes searches to fail.

Resolves http://opensimulator.org/mantis/view.php?id=6935
0.8.0.3
Oren Hurvitz 2013-10-30 12:46:03 +02:00
parent 6edc446780
commit a2dd8f31de
2 changed files with 4 additions and 2 deletions

View File

@ -10387,7 +10387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerDirFindQuery(this,
dirFindQueryPacket.QueryData.QueryID,
Utils.BytesToString(
dirFindQueryPacket.QueryData.QueryText),
dirFindQueryPacket.QueryData.QueryText).Trim(),
dirFindQueryPacket.QueryData.QueryFlags,
dirFindQueryPacket.QueryData.QueryStart);
}

View File

@ -150,6 +150,8 @@ namespace OpenSim.Region.CoreModules.Framework.Search
void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart)
{
queryText = queryText.Trim();
if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People)
{
if (string.IsNullOrEmpty(queryText))