- if( Client->UID != -1 ) {
- Client->bIsAuthed = 1;
- sendf(Client->Socket, "200 Auth OK\n");
+ if( Client->UID == -1 ) {
+ sendf(Client->Socket, "401 Auth Failure\n");
+ return ;
+ }
+
+ flags = Bank_GetFlags(Client->UID);
+ if( flags & USER_FLAG_DISABLED ) {
+ Client->UID = -1;
+ sendf(Client->Socket, "403 Account Disabled\n");
+ return ;
+ }
+ if( flags & USER_FLAG_INTERNAL ) {
+ Client->UID = -1;
+ sendf(Client->Socket, "403 Internal account\n");