i think i might have a bug some where could some one help? it all works but the admin pass part any idea?
<?php
CASE "!login":
IF( UserInGroup( "register" ,"Registered" ) == 1 )
THEN
IF( UserInGroup( "admin",$userName ) == 1 || UserInGroup( "beta",$userName ) == 1)
THEN
openPrivTextButton( "LUser1",50,25,25,15,5,96,"Username","Username",50,LUser);
openPrivTextButton( "LPass1",50,51,25,15,5,96,"Password","Password",30,LPass);
openPrivTextButton( "LAPass",50,76,25,15,5,96,"Admin Password","Admin Password",30,LAPass);
openPrivButton( "Login",50,101,25,15,5,-1,96,"Login",Login);
ELSE
openPrivTextButton( "LUser",50,25,25,15,5,96,"Username","Username",30,LUser);
openPrivTextButton( "LPass",50,51,25,15,5,96,"Password","Password",30,LPass);
openPrivButton( "Login",50,101,25,15,5,-1,96,"Login",Login);
ENDIF
Else
privMsg( "^1Your Not Registered");
ENDIF
BREAK;
?>
<?php
CASE "!register":
IF( UserInGroup( "register" ,"Registered" ) != 1 )
THEN
openPrivTextButton( "RUser",50,25,25,15,5,96,"Username","Username",30,User);
openPrivTextButton( "RPass",50,51,25,15,5,96,"Password","Password",30,Pass);
MoveUserToGroup( "register" , "Registered" );
SaveGroupToFile( $userName, "./../user/registered/" . $userName . ".txt" );
Else
privMsg( "^1Already Registered");
ENDIF
BREAK;
?>
<?php
Sub User( $User )
ClosePrivButton("RUser");
$userName = GetCurrentPlayerVar("UserName");
MoveUserToGroup( "register" , "UserName = " . $User );
SaveGroupToFile( "register" , "./../user/registered/" . $userName . ".txt" );
RemoveUserFromGroup( "register" , "UserName = " . $User );
EndSub
Sub Pass( $Pass )
ClosePrivButton("RPass");
$userName = GetCurrentPlayerVar("UserName");
MoveUserToGroup( "register" , "Password = " . $Pass );
SaveGroupToFile( "register" , "./../user/registered/" . $userName . ".txt" );
RemoveUserFromGroup( "register" , "Password = " . $Pass );
EndSub
Sub LUser( $LUser )
GlobalVar $LUser1;
$LUser1 = $LUser;
EndSub
Sub LPass( $LPass )
GlobalVar $LPass1;
$LPass1 = $LPass;
EndSub
Sub LAPass( $LAPass )
GlobalVar $LAPass1;
$LPass1 = $LAPass;
EndSub
Sub Login( $KeyFlags,$id )
$userName = GetCurrentPlayerVar("UserName");
UserGroupFromFile( "register", "./../user/registered/" . $userName . ".txt" );
IF( UserInGroup( "register" , "UserName = " . $LUser1 ) == 1 && UserInGroup( "register" , "Password = " . $LPass1 ) == 1 )
THEN
IF( $LAPass1 == $AdminPass || $LAPass1 == $BetaPass )
THEN
privMsg( "^2Thank you for logging in Admin");
MoveUserToGroup( "tempadmin",$userName );
ELSE
IF( $LAPass1 == "" )
THEN
closePrivButton("LUser1");
closePrivButton("LPass1");
privMsg( "^2Thank You For Logging In" );
closePrivButton("LAPass");
closePrivButton("Login");
ELSE
privMsg( "^1Incorrect Admin Password");
ENDIF
ENDIF
ELSE
privMsg( "Incorrect UserName And/Or Password" );
ENDIF
EndSub
?>