Subversion Repositories IRC-Archiver

Rev

Rev 13 | Rev 17 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 15
Line 1... Line 1...
1
/* $Id: bot.c 13 2024-08-30 07:33:43Z nishi $ */
1
/* $Id: bot.c 15 2024-08-30 08:02:46Z nishi $ */
2
 
2
 
3
#include "ia_bot.h"
3
#include "ia_bot.h"
4
 
4
 
5
#include "ia_util.h"
5
#include "ia_util.h"
6
#include "ia_db.h"
6
#include "ia_db.h"
Line 171... Line 171...
171
					}
171
					}
172
 
172
 
173
					if(msg[0] == 1 && msg[strlen(msg) - 1] == 1) {
173
					if(msg[0] == 1 && msg[strlen(msg) - 1] == 1) {
174
						/* CTCP */
174
						/* CTCP */
175
						if(strcasecmp(msg, "\x01VERSION\x01") == 0) {
175
						if(strcasecmp(msg, "\x01VERSION\x01") == 0) {
176
							sprintf(construct, "NOTICE %s :\x01VERSION IRC-Archiver %s / IRC Frameworks %s: http://svn.nishi.boats/repo/irc-archiver\x01", nick, IRCARC_VERSION, IRCFW_VERSION);
176
							sprintf(construct, "NOTICE %s :\x01VERSION IRC-Archiver %s / IRC Frameworks %s: http://nishi.boats/ircarc\x01", nick, IRCARC_VERSION, IRCFW_VERSION);
177
							ircfw_socket_send_cmd(ia_sock, NULL, construct);
177
							ircfw_socket_send_cmd(ia_sock, NULL, construct);
178
						}
178
						}
179
					} else if(sentin[0] == '#') {
179
					} else if(sentin[0] == '#') {
180
						/* This was sent in channel ; log it */
180
						/* This was sent in channel ; log it */
181
						ia_db_put(nick, sentin, msg);
181
						ia_db_put(nick, sentin, msg);