IsUser MPL function, newuserapp bugfix

This commit is contained in:
mysticbbs 2012-06-30 16:25:29 -04:00
parent 03a06fa877
commit 1d45f04349
4 changed files with 29 additions and 16 deletions

View File

@ -4205,3 +4205,8 @@
If the newuserapp.mpx exists in the scripts directory, it will be If the newuserapp.mpx exists in the scripts directory, it will be
executed instead of the normal application process. executed instead of the normal application process.
+ New MPL function IsUser takes a string value which can contain either
a user realname, handle, or user perm index number. If the user exists,
it will return a TRUE result or FALSE if the user does not exist.

View File

@ -90,21 +90,24 @@ Begin
FillChar (ThisUser, SizeOf(ThisUser), #0); FillChar (ThisUser, SizeOf(ThisUser), #0);
FillChar (Security, SizeOf(Security), #0); FillChar (Security, SizeOf(Security), #0);
UserNum := -1; UserNum := -1;
ThisUser.ScreenSize := Config.DefScreenSize; ThisUser.ScreenSize := Config.DefScreenSize;
ThisUser.Theme := Config.DefThemeFile; ThisUser.Theme := Config.DefThemeFile;
ThisUser.DateType := 1; ThisUser.StartMenu := Config.DefStartMenu;
ThisUser.HotKeys := True; ThisUser.DateType := 1;
ThisUser.RealName := 'Unknown'; ThisUser.HotKeys := True;
ThisUser.Handle := ThisUser.RealName; ThisUser.RealName := 'Unknown';
ThisUser.EditType := 1; ThisUser.Handle := ThisUser.RealName;
ThisUser.Birthday := CurDateJulian; ThisUser.EditType := 1;
ThisUser.Gender := 'U'; ThisUser.Birthday := CurDateJulian;
ThisUser.FirstOn := CurDateDos; ThisUser.Gender := 'U';
ThisUser.TimeLeft := Config.LoginTime; ThisUser.FirstOn := CurDateDos;
ThisUser.Archive := Config.qwkArchive; ThisUser.TimeLeft := Config.LoginTime;
ThisUser.LastFGroup := Config.StartFGroup; ThisUser.Archive := Config.qwkArchive;
ThisUser.LastMGroup := Config.StartMGroup; ThisUser.LastFGroup := Config.StartFGroup;
ThisUser.LastMGroup := Config.StartMGroup;
ThisUser.UseLBQuote := True;
ThisUser.UseFulLChat := True;
IgnoreGroup := False; IgnoreGroup := False;
InChat := False; InChat := False;

View File

@ -286,8 +286,9 @@ Begin
AddProc ({$IFDEF MPLPARSER} 'strmci', {$ENDIF} 's', iString); // 535 AddProc ({$IFDEF MPLPARSER} 'strmci', {$ENDIF} 's', iString); // 535
AddProc ({$IFDEF MPLPARSER} 'getcharxy', {$ENDIF} 'bb', iChar); // 536 AddProc ({$IFDEF MPLPARSER} 'getcharxy', {$ENDIF} 'bb', iChar); // 536
AddProc ({$IFDEF MPLPARSER} 'getattrxy', {$ENDIF} 'bb', iByte); // 537 AddProc ({$IFDEF MPLPARSER} 'getattrxy', {$ENDIF} 'bb', iByte); // 537
AddProc ({$IFDEF MPLPARSER} 'putthisuser' {$ENDIF} '', iNone); // 538 AddProc ({$IFDEF MPLPARSER} 'putthisuser', {$ENDIF} '', iNone); // 538
AddProc ({$IFDEF MPLPARSER} 'putuser', {$ENDIF} 'l', iNone); // 539 AddProc ({$IFDEF MPLPARSER} 'putuser', {$ENDIF} 'l', iNone); // 539
AddProc ({$IFDEF MPLPARSER} 'isuser', {$ENDIF} 's', iBool); // 540
{ END OF PROCEDURE DEFINITIONS } { END OF PROCEDURE DEFINITIONS }

View File

@ -1883,6 +1883,10 @@ Begin
End; End;
538 : PutUserVars(Session.User.ThisUser); 538 : PutUserVars(Session.User.ThisUser);
539 : PutUserRecord(Param[1].L); 539 : PutUserRecord(Param[1].L);
540 : Begin
TempBool := Session.User.FindUser(Param[1].S, False);
Store (TempBool, 1);
End;
End; End;
End; End;