Login/user searches now allow user number instead of only names

This commit is contained in:
mysticbbs 2012-06-30 15:32:30 -04:00
parent 5b325e07ca
commit c07b6257f6
2 changed files with 12 additions and 2 deletions

View File

@ -4191,3 +4191,10 @@
+ The Full screen editor now does a full redraw of the editor screen and
text after uploading a .txt file into the editor.
+ New MPL procedure "hangup" does exactly what you think it does to the
caller! :)
+ Mystic now allows users to login by the permanent index number as well as
their user name. Private e-mails and other areas of the BBS also allow
for usage of the permanent index now as well.

View File

@ -308,19 +308,22 @@ Begin
End;
Function TBBSUser.FindUser (Str: String; Adjust: Boolean) : Boolean;
Var
RecNum : LongInt;
Begin
FindUser := False;
If Str = '' Then Exit;
Str := strUpper(Str);
RecNum := strS2I(Str);
Reset (UserFile);
While Not Eof(UserFile) Do Begin
Read (UserFile, TempUser);
If ((strUpper(TempUser.RealName) = Str) or (strUpper(TempUser.Handle) = Str)) and (TempUser.Flags And UserDeleted = 0) Then Begin
If ((TempUser.PermIdx = RecNum) or (strUpper(TempUser.RealName) = Str) or (strUpper(TempUser.Handle) = Str)) and (TempUser.Flags And UserDeleted = 0) Then Begin
If Adjust Then UserNum := FilePos(UserFile);
FindUser := True;