if (next_target_out)
*next_target_out = CurrentTime - (TARGET_DELAY * free_targets - 1);
}
- else if ((CurrentTime - me.since) > IPCHECK_CLONE_DELAY) {
+ else if ((CurrentTime - cli_since(&me)) > IPCHECK_CLONE_DELAY) {
/*
* Don't refuse connection when we just rebooted the server
*/
struct IPRegistryEntry* entry = ip_registry_find((cli_ip(cptr)).s_addr);
if (!entry) {
- Debug((DEBUG_ERROR, "Missing registry entry for: %s", con_sock_ip(cptr)));
+ Debug((DEBUG_ERROR, "Missing registry entry for: %s", cli_sock_ip(cptr)));
return;
}
if (entry->target) {
- memcpy(con_targets(cptr), entry->target->targets, MAXTARGETS);
+ memcpy(cli_targets(cptr), entry->target->targets, MAXTARGETS);
free_targets = entry->target->count;
tr = " tr";
}
}
assert(0 != entry->target);
- memcpy(entry->target->targets, con_targets(cptr), MAXTARGETS);
+ memcpy(entry->target->targets, cli_targets(cptr), MAXTARGETS);
/*
* This calculation can be pretty unfair towards large multi-user hosts, but
* there is "nothing" we can do without also allowing spam bots to send more
* ALL should get no free targets when reconnecting. We'd need to store an entry
* per client (instead of per IP number) to avoid this.
*/
- if (con_nexttarget(cptr) < CurrentTime) {
+ if (cli_nexttarget(cptr) < CurrentTime) {
/*
* Number of free targets
*/
- free_targets = (CurrentTime - con_nexttarget(cptr)) / TARGET_DELAY + 1;
+ free_targets = (CurrentTime - cli_nexttarget(cptr)) / TARGET_DELAY + 1;
}
else
free_targets = 0;