{ "PCMSG_DISABLED", "Proxy scanning is $bdisabled$b." },
{ "PCMSG_NOT_CACHED", "No proxycheck records exist for IP %s." },
{ "PCMSG_STATUS_CHECKING", "IP %s proxycheck state: last touched %s ago, still checking" },
- { "PCMSG_STATUS_ACCEPTED", "IP %s proxycheck state: last touched %s ago, acepted" },
+ { "PCMSG_STATUS_ACCEPTED", "IP %s proxycheck state: last touched %s ago, accepted" },
{ "PCMSG_STATUS_REJECTED", "IP %s proxycheck state: last touched %s ago, rejected: %s" },
{ "PCMSG_STATUS_UNKNOWN", "IP %s proxycheck state: last touched %s ago, invalid status" },
{ "PCMSG_STATISTICS", "Since booting, I have checked %d clients for illicit proxies, and detected %d proxy hosts.\nI am currently checking %d clients (out of %d max) and have a backlog of %d more to start on.\nI currently have %d hosts cached.\nI know how to detect %d kinds of proxies." },
return;
case 0: break;
}
- fd->wants_reads = 1;
if (SOCKCHECK_DEBUG) {
log_module(PC_LOG, LOG_INFO, "Connected: to %s port %d.", client->addr->hostname, client->state->port);
}
client->state = client->tests->list[client->test_index];
client->read_pos = 0;
client->read_used = 0;
- client->fd = io_fd = ioset_connect(sockcheck_conf.local_addr, sockcheck_conf.local_addr_len, client->addr->hostname, client->state->port, 0, client, sockcheck_connected);
+ io_fd = ioset_connect(sockcheck_conf.local_addr, sockcheck_conf.local_addr_len, client->addr->hostname, client->state->port, 0, client, sockcheck_connected);
+ client->fd = io_fd;
if (!io_fd) {
client->test_index++;
continue;
}
} else {
char *scanhost = argv[n];
- if (!irc_pton(&ipaddr, NULL, scanhost)) {
+ if (irc_pton(&ipaddr, NULL, scanhost)) {
sockcheck_queue_address(ipaddr);
reply("PCMSG_ADDRESS_QUEUED", scanhost);
} else {
sockcheck_conf.local_addr_len = ai->ai_addrlen;
sockcheck_conf.local_addr = calloc(1, ai->ai_addrlen);
memcpy(sockcheck_conf.local_addr, ai->ai_addr, ai->ai_addrlen);
+ freeaddrinfo(ai);
} else {
sockcheck_conf.local_addr_len = 0;
sockcheck_conf.local_addr = NULL;