From adaae4129acdd981ea7c2ae386d0ac41a93a4b7a Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 4 Jun 2012 10:37:25 +0800 Subject: [PATCH] Allowed transferring to/from disabled accounts --- src/server/dispense.c | 4 ++-- src/server/server.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/server/dispense.c b/src/server/dispense.c index b05c81c..181181f 100644 --- a/src/server/dispense.c +++ b/src/server/dispense.c @@ -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) ) diff --git a/src/server/server.c b/src/server/server.c index 98b0325..9780058 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -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 ; } -- 2.20.1