equal
deleted
inserted
replaced
13 #include <libintl.h> |
13 #include <libintl.h> |
14 |
14 |
15 #include <mcbot.h> |
15 #include <mcbot.h> |
16 #include <config.h> |
16 #include <config.h> |
17 #include "common.h" |
17 #include "common.h" |
|
18 |
|
19 #include <compat.h> |
18 |
20 |
19 #ifndef CONFIG_FILE |
21 #ifndef CONFIG_FILE |
20 #define CONFIG_FILE "/var/lib/mcbot/.mcbotrc" |
22 #define CONFIG_FILE "/var/lib/mcbot/.mcbotrc" |
21 #endif |
23 #endif |
22 |
24 |
84 |
86 |
85 signal (SIGTERM, sigproc); |
87 signal (SIGTERM, sigproc); |
86 |
88 |
87 if (uc.channel) { |
89 if (uc.channel) { |
88 fprintf (message.stream, "JOIN :%s\r\n", uc.channel); |
90 fprintf (message.stream, "JOIN :%s\r\n", uc.channel); |
89 strncpy (message.current_channel, uc.channel, 40); |
91 safe_strncpy (message.current_channel, uc.channel, sizeof (message.current_channel)); |
90 if (uc.topic) |
92 if (uc.topic) |
91 fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic); |
93 fprintf (message.stream, "TOPIC %s :%s\r\n", uc.channel, uc.topic); |
92 } |
94 } |
93 |
95 |
94 while (!feof (message.stream)) { |
96 while (!feof (message.stream)) { |