This commit is contained in:
mark 2007-04-26 19:21:11 +00:00
parent 5021ea6225
commit cbc1943bed

View file

@ -2042,7 +2042,7 @@ namespace Server.Gumps
} }
case 7: case 7:
{ {
ArrayList results = new ArrayList(); ArrayList results;
TextRelay matchEntry = info.GetTextEntry( 0 ); TextRelay matchEntry = info.GetTextEntry( 0 );
string match = ( matchEntry == null ? null : matchEntry.Text.Trim().ToLower() ); string match = ( matchEntry == null ? null : matchEntry.Text.Trim().ToLower() );
@ -2050,12 +2050,13 @@ namespace Server.Gumps
if ( match == null || match.Length == 0 ) if ( match == null || match.Length == 0 )
{ {
results.Add( Accounts.GetAccounts() ); results = new ArrayList( (ICollection)Accounts.GetAccounts() );
results.Sort( AccountComparer.Instance ); results.Sort( AccountComparer.Instance );
//notice = "You must enter a username to search."; //notice = "You must enter a username to search.";
} }
else else
{ {
results = new ArrayList();
foreach ( Account check in Accounts.GetAccounts() ) foreach ( Account check in Accounts.GetAccounts() )
{ {
if ( check.Username.ToLower().IndexOf( match ) >= 0 ) if ( check.Username.ToLower().IndexOf( match ) >= 0 )