Fixing crappy code in coke handler, debug in others
[tpg/opendispense2.git] / src / server / server.c
index 46cb4c6..315b129 100644 (file)
@@ -1031,13 +1031,14 @@ void Server_Cmd_USERINFO(tClient *Client, char *Args)
        space = strchr(user, ' ');
        if(space)       *space = '\0';
        
-       if( giDebugLevel )
-               Debug(Client, "User Info '%s'", user);
+       if( giDebugLevel )      Debug(Client, "User Info '%s'", user);
        
        // Get recipient
        uid = Bank_GetAcctByName(user);
+       
+       if( giDebugLevel >= 2 ) Debug(Client, "uid = %i", uid);
        if( uid == -1 ) {
-               sendf(Client->Socket, "404 Invalid user");
+               sendf(Client->Socket, "404 Invalid user\n");
                return ;
        }
        
@@ -1160,9 +1161,10 @@ void Server_Cmd_USERFLAGS(tClient *Client, char *Args)
 void Debug(tClient *Client, const char *Format, ...)
 {
        va_list args;
-       printf("%010i [%i] ", (int)time(NULL), Client->ID);
+       //printf("%010i [%i] ", (int)time(NULL), Client->ID);
+       printf("[%i] ", Client->ID);
        va_start(args, Format);
-       vprintf(NULL, 0, Format, args);
+       vprintf(Format, args);
        va_end(args);
        printf("\n");
 }

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