src/main.c
changeset 31 bbcb8a3366b4
parent 29 08ec6ddd6eea
child 33 56571d34d754
equal deleted inserted replaced
30:eed9f710ba3b 31:bbcb8a3366b4
    14 
    14 
    15 #include <mcbot.h>
    15 #include <mcbot.h>
    16 #include <config.h>
    16 #include <config.h>
    17 
    17 
    18 #ifndef CONFIG_FILE
    18 #ifndef CONFIG_FILE
    19 #define CONFIG_FILE "/var/lib/nobody/.mcbotrc"
    19 #define CONFIG_FILE "/var/lib/mcbot/.mcbotrc"
    20 #endif
    20 #endif
    21 
    21 
    22 #ifndef LOCALE_PATH
    22 #ifndef LOCALE_PATH
    23 #define LOCALE_PATH "/var/lib/nobody/data/locale"
    23 #define LOCALE_PATH "/var/lib/mcbot/data/locale"
    24 #endif
    24 #endif
    25 
    25 
    26 short active = 1;               /* needed for a safe shutdown */
    26 short active = 1;               /* needed for a safe shutdown */
    27 
    27 
    28 void sigproc ()
    28 void sigproc ()
   103                 break;
   103                 break;
   104             }
   104             }
   105         } else {
   105         } else {
   106             if ((msg = parse (&message)) != NULL) {
   106             if ((msg = parse (&message)) != NULL) {
   107                 fprintf (message.stream, "%s\r\n", msg);
   107                 fprintf (message.stream, "%s\r\n", msg);
       
   108                 fflush (message.stream);
   108                 printf ("%10s %s", "WRITE", msg);
   109                 printf ("%10s %s", "WRITE", msg);
   109             }
   110             }
   110         }
   111         }
   111     }
   112     }
   112     printf ("\n\nClosing Connection\n\n");
   113     printf ("\n\nClosing Connection\n\n");