equal
deleted
inserted
replaced
40 if (bindtextdomain ("mcbot", LOCALE_PATH) != NULL) { |
40 if (bindtextdomain ("mcbot", LOCALE_PATH) != NULL) { |
41 (void)textdomain ("mcbot"); |
41 (void)textdomain ("mcbot"); |
42 (void)setlocale (LC_MESSAGES, ""); |
42 (void)setlocale (LC_MESSAGES, ""); |
43 } |
43 } |
44 |
44 |
45 printf ("mcbot-%1.2f\n", VERSION); |
45 printf ("mcbot-%1.2f\n", BOT_VERSION); |
46 |
46 |
47 if ((len = config (&uc, CONFIG_FILE)) != 0) { |
47 if ((len = config (&uc, CONFIG_FILE)) != 0) { |
48 switch (len) { |
48 switch (len) { |
49 case -1: |
49 case -1: |
50 printf ("You need to create a config file %s\n", CONFIG_FILE); |
50 printf ("You need to create a config file %s\n", CONFIG_FILE); |
82 |
82 |
83 signal (SIGTERM, sigproc); |
83 signal (SIGTERM, sigproc); |
84 |
84 |
85 if (uc.channel) { |
85 if (uc.channel) { |
86 fprintf (message.stream, "JOIN :%s\r\n", uc.channel); |
86 fprintf (message.stream, "JOIN :%s\r\n", uc.channel); |
87 message.current_channel = uc.channel; |
87 strncpy (message.current_channel, uc.channel, 40); |
88 if (uc.topic) |
88 if (uc.topic) |
89 fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic); |
89 fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic); |
90 } |
90 } |
91 |
91 |
92 while (!feof (message.stream)) { |
92 while (!feof (message.stream)) { |