changeset 14 | fe8adc56b109 |
parent 13 | d3554afaa768 |
child 15 | f19c1f9b4cd3 |
13:d3554afaa768 | 14:fe8adc56b109 |
---|---|
15 #include <locale.h> |
15 #include <locale.h> |
16 #include <libintl.h> |
16 #include <libintl.h> |
17 |
17 |
18 #ifndef DATABASE_FILE |
18 #ifndef DATABASE_FILE |
19 #define DATABASE_FILE "/var/lib/nobody/data/mcbot.dat" |
19 #define DATABASE_FILE "/var/lib/nobody/data/mcbot.dat" |
20 #endif |
|
21 |
|
22 #ifndef SOURCE_URL |
|
23 #define SOURCE_URL "http://largo.homelinux.org/cgi-bin/gitweb.cgi?p=net/mcbot.git" |
|
20 #endif |
24 #endif |
21 |
25 |
22 const |
26 const |
23 char *COMMAND_LIST[] = { |
27 char *COMMAND_LIST[] = { |
24 "!help Known Commands: join(1), leave(2), add(3), replace(4), delete(5), list(6), search(7), info(8)\r\n", |
28 "!help Known Commands: join(1), leave(2), add(3), replace(4), delete(5), list(6), search(7), info(8)\r\n", |
177 } |
181 } |
178 return msg; |
182 return msg; |
179 |
183 |
180 case 8: /* !info */ |
184 case 8: /* !info */ |
181 snprintf (msg, 512, "PRIVMSG %s :I am MCBot-%1.2f and my source code can be found on %s\r\n", |
185 snprintf (msg, 512, "PRIVMSG %s :I am MCBot-%1.2f and my source code can be found on %s\r\n", |
182 message->channel, VERSION, "http://largo.homelinux.org/svn/c/mcbot/trunk"); |
186 message->channel, VERSION, SOURCE_URL); |
183 return msg; |
187 return msg; |
184 |
188 |
185 case 9: /* !ping */ |
189 case 9: /* !ping */ |
186 if ((token = strtok (NULL, "\r\n"))) |
190 if ((token = strtok (NULL, "\r\n"))) |
187 snprintf (msg, 512, "PRIVMSG %s :PING 0815\r\n", token); |
191 snprintf (msg, 512, "PRIVMSG %s :PING 0815\r\n", token); |