fixed statistics user counter
[NeonServV5.git] / src / IRCParser.c
index 750ac7b783c871643de7fe85ecb1b04cf7a491ee..ab1c69c49099ceabbe58c0095597f95dd05d64f6 100644 (file)
@@ -57,7 +57,11 @@ int parse_lines(struct ClientSocket *client, char *lines, int len) {
 static void parse_line(struct ClientSocket *client, char *line) {
     int argc = 0;
     char *argv[MAXNUMPARAMS];
+    #ifdef HAVE_THREADS
+    printf("[%lu recv %lu] %s\n", syscall(SYS_gettid), (unsigned long) strlen(line), line);
+    #else
     printf("[recv %lu] %s\n", (unsigned long) strlen(line), line);
+    #endif
     if(line[0] == ':')
         line++;
     else
@@ -596,7 +600,7 @@ static IRC_CMD(raw_251) {
     if(argc < 2) return 0;
     char *total_user_str = argv[1];
     char total_visible[20], total_invisible[20];
-    int i, total_visible_pos = 0, total_invisible_pos = 0;
+    int i = 0, total_visible_pos = 0, total_invisible_pos = 0;
     while(*total_user_str) {
         if(*total_user_str == ' ') {
             i++;