Allowed transferring to/from disabled accounts
authorJohn Hodge <[email protected]>
Mon, 4 Jun 2012 02:37:25 +0000 (10:37 +0800)
committerJohn Hodge <[email protected]>
Mon, 4 Jun 2012 02:37:25 +0000 (10:37 +0800)
src/server/dispense.c
src/server/server.c

index b05c81c..181181f 100644 (file)
@@ -334,8 +334,8 @@ int _GetMinBalance(int Account)
  */
 int _CanTransfer(int Source, int Destination, int Ammount)
 {
-       if( Bank_GetFlags(Source) & USER_FLAG_DISABLED )
-               return 0;
+//     if( Bank_GetFlags(Source) & USER_FLAG_DISABLED )
+//             return 0;
        if( Ammount > 0 )
        {
                if( Bank_GetBalance(Source) - Ammount < _GetMinBalance(Source) )
index 98b0325..9780058 100644 (file)
@@ -685,8 +685,7 @@ void Server_Cmd_SETEUSER(tClient *Client, char *Args)
                sendf(Client->Socket, "404 User not found\n");
                return ;
        }
-       
-       // You can't be an internal account
+       // You can't be an internal account (unless you're an admin)
        if( !(userFlags & USER_FLAG_ADMIN) )
        {
                eUserFlags = Bank_GetFlags(Client->EffectiveUID);
@@ -705,7 +704,7 @@ void Server_Cmd_SETEUSER(tClient *Client, char *Args)
 
        // Disabled accounts
        if( userFlags & USER_FLAG_DISABLED ) {
-               Client->UID = -1;
+               Client->EffectiveUID = -1;
                sendf(Client->Socket, "403 Account disabled\n");
                return ;
        }

UCC git Repository :: git.ucc.asn.au