projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git]
/
ircd
/
s_bsd.c
diff --git
a/ircd/s_bsd.c
b/ircd/s_bsd.c
index cb8bfdbd9e418a79e809c5d3e537dc993f3032c0..d71037bfe5176fcb288fc34a3bd77733fd7d7574 100644
(file)
--- a/
ircd/s_bsd.c
+++ b/
ircd/s_bsd.c
@@
-579,12
+579,23
@@
void add_connection(struct Listener* listener, int fd)
* reject the user.
*/
if (!IPcheck_local_connect(addr.sin_addr, &next_target) && !listener->server) {
* reject the user.
*/
if (!IPcheck_local_connect(addr.sin_addr, &next_target) && !listener->server) {
- ++ServerStats->is_ref;
+#ifdef IPCHECKDEBUG
+ char buff[512];
+ snprintf(buff,"\n%s [%i connections active]\n",
+ throttle_message,
+ IPcheck_nr(addr.sin_addr));
+ buff[511]=0;
+ send(fd,buff,strlen(buff));
+#else
/*
* strlen(throttle_message) == 66
/*
* strlen(throttle_message) == 66
+ *
+ * strlen is slow, so we use the constant here.
*/
send(fd, throttle_message, 66, 0);
*/
send(fd, throttle_message, 66, 0);
+#endif
close(fd);
close(fd);
+ ++ServerStats->is_ref;
return;
}
return;
}