From b6cb4e36616d112d6586558b805fb11aa7b23944 Mon Sep 17 00:00:00 2001 From: stskeeps Date: Thu, 22 Jun 2000 13:48:16 +0000 Subject: [PATCH] - Made operkick be part of NO_OPEROVERRIDE - Made admins unable to be shunned - Made some socket errors which normally only showed up in DEBUGMODE, show up in ircd.log as well --- Changes | 5 ++++- src/fdmaxcounter.c | 3 ++- src/s_bsd.c | 9 +++++++-- src/s_kline.c | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index c724fed69..2fc7fe890 100644 --- a/Changes +++ b/Changes @@ -381,4 +381,7 @@ - Fixed a bug in badwords not loading words correctly, and upped word limit to 50 - Small fix with ./Config showing incorrect path of stddef.h -- Made operkick be part of NO_OPEROVERRIDE \ No newline at end of file +- Made operkick be part of NO_OPEROVERRIDE +- Made admins unable to be shunned +- Made some socket errors which normally only showed up in DEBUGMODE, show + up in ircd.log as well diff --git a/src/fdmaxcounter.c b/src/fdmaxcounter.c index aea077aa5..f0f38b7b1 100644 --- a/src/fdmaxcounter.c +++ b/src/fdmaxcounter.c @@ -20,13 +20,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include main() { int i; int s; - for (i = 1; i <= 2048; i++) + for (i = 1; i <= 10000; i++) { s = socket(AF_INET, SOCK_STREAM, 0); if (s < 0) diff --git a/src/s_bsd.c b/src/s_bsd.c index b9bd9ec37..b7f3ddc7f 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -92,6 +92,7 @@ ID_CVS("$Id$"); #ifdef _WIN32 extern HWND hwIRCDWnd; #endif +extern char backupbuf[8192]; aClient *local[MAXCONNECTIONS]; int highest_fd = 0, readcalls = 0, udpfd = -1, resfd = -1; static struct SOCKADDR_IN mysk; @@ -215,6 +216,7 @@ void report_error(text, cptr) errtmp = err; #endif sendto_ops(text, host, strerror(errtmp)); + ircd_log(text,host,strerror(errtmp)); #ifdef USE_SYSLOG syslog(LOG_WARNING, text, host, strerror(errtmp)); #endif @@ -266,7 +268,7 @@ int inetport(cptr, name, port) { #if !defined(DEBUGMODE) && !defined(_WIN32) #endif - report_error("opening stream socket %s:%s", cptr); + report_error("Cannot open stream socket() %s:%s", cptr); return -1; } else if (cptr->fd >= MAXCLIENTS) @@ -305,7 +307,10 @@ int inetport(cptr, name, port) if (bind(cptr->fd, (struct SOCKADDR *)&server, sizeof(server)) == -1) { - report_error("binding stream socket %s:%s", cptr); + ircsprintf(backupbuf, "Error binding stream socket to IP %s port %i", + ipname, port); + strcat(backupbuf, "- %s:%s"); + report_error(backupbuf, cptr); #ifndef _WIN32 (void)close(cptr->fd); #else diff --git a/src/s_kline.c b/src/s_kline.c index 447250bc7..dc08cd19c 100644 --- a/src/s_kline.c +++ b/src/s_kline.c @@ -321,6 +321,8 @@ int find_tkline_match(cptr, xx) { if (IsShunned(cptr)) return -1; + if (IsAdmin(cptr)) + return -1; SetShunned(cptr); strncpy(gmt2, asctime(gmtime((clock_t *) &lp->expire_at)), sizeof(gmt2));