From e06f3f729ff6dff60dd3cb6521fed4fdbec8bcfe Mon Sep 17 00:00:00 2001 From: Perry Lorier Date: Sun, 30 Apr 2000 10:22:15 +0000 Subject: [PATCH] Author: Isomer / ZenShadow Log message: I fixed some minor bugs ZenShadow cleaned up some stuff. It's a bug, blame ZenShadow. If it's a welcome feature I'll take the credit. Thanks :) git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@220 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 28 ++++++++++++++++++++++++---- TODO | 2 -- config/config-sh.in | 14 ++++++++++---- config/gen.ircd.Makefile | 1 + include/supported.h | 2 +- ircd/Makefile.in | 4 ++++ ircd/ircd.c | 12 +----------- ircd/ircd_signal.c | 11 ----------- ircd/s_misc.c | 17 ----------------- ircd/s_user.c | 10 ---------- 10 files changed, 41 insertions(+), 60 deletions(-) diff --git a/ChangeLog b/ChangeLog index a782980..fc00486 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,26 @@ -2000-04-30 Steven M. Doyle - * config/config-sh.in: Fix for CHROOT - * ircd/ircd.c: General Cleanup +2000-04-30 Perry Lorier + * config/config-sh.in: Fix for CONNEXIT + * ircd/s_{user,misc}.c: Fix for CONNEXIT + +2000-04-30 Steven M. Doyle + * ircd/ircd.c + - general cleanups and readability enhancements + - rewrite of setuid/chroot code. + - server will no longer run as root + - -DPROFIL compile option removed + + * config/config-sh.in + - Fixed up chroot compile options + - Added options for debug and profile compiles + + * config/gen.ircd.Makefile + - Support for new debug/profile options + + * ircd/Makefile.in + - Support for new debug/profile options + + * ircd/ircd_signal.c + - Removed -DPROFIL 2000-04-30 Perry Lorier * ircd/s_bsd.c: Sigh. :) @@ -1000,7 +1020,7 @@ # # ChangeLog for ircu2.10.11 # -# $Id: ChangeLog,v 1.117 2000-04-30 06:44:27 isomer Exp $ +# $Id: ChangeLog,v 1.118 2000-04-30 10:22:14 isomer Exp $ # # Insert new changes at beginning of the change list. # diff --git a/TODO b/TODO index 3dfdcfe..105739c 100644 --- a/TODO +++ b/TODO @@ -36,6 +36,4 @@ Medium Priority: * Document undernet protocol as it is used in doc/rfc1459.unet * Finish tokenization. -* Allow for /WHO by IP address. (for finding who's port scanning you - for example). Suggested by Nuke diff --git a/config/config-sh.in b/config/config-sh.in index f2bc5e9..efbb9ba 100644 --- a/config/config-sh.in +++ b/config/config-sh.in @@ -103,6 +103,16 @@ comment 'Compile stuff' LIBS=none fi string 'Which extra libraries do you need [none]' IRCDLIBS "$LIBS" + bool 'Generate debug symbols?' DEBUGSYMBOLS "y" + bool 'Compile in profiling support (gcc and maybe SUNpro)?' IRCUPROFILE "n" + unset ZSTEMP + if [ "$DEBUGSYMBOLS" = "y" ] ; then + ZSTEMP="-g" + fi + if [ "$IRCUPROFILE" = "y" ] ; then + ZSTEMP="-pg $ZSTEMP" + fi + define_string DEBUGFLAGS "$ZSTEMP" eval bindir="$bindir" string 'In which directory should I install the ircd binary' BINDIR $bindir if [ ! -d "$BINDIR" ]; then @@ -311,10 +321,6 @@ comment 'Configuration' int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252 int 'Default port for connections to other servers' SERVER_PORT 4400 int 'Nickname history length' NICKNAMEHISTORYLENGTH 800 - bool 'Allow Opers to see (dis)connects of local clients' ALLOW_SNO_CONNEXIT - if [ "$ALLOW_SNO_CONNEXIT" = "y" ]; then - bool 'Show IP address in client connection notices' SNO_CONNEXIT_IP - fi bool 'Do you want to use R: lines in your configuration file' R_LINES if [ "$R_LINES" = "y" ]; then bool 'Process R: lines every rehash' R_LINES_REHASH y diff --git a/config/gen.ircd.Makefile b/config/gen.ircd.Makefile index f6db89c..a4ee7ad 100644 --- a/config/gen.ircd.Makefile +++ b/config/gen.ircd.Makefile @@ -3,6 +3,7 @@ mv ../ircd/Makefile ../ircd/Makefile.tmp sed -e "s:^CC=.*:CC=$CC:" \ -e "s:^CFLAGS=.*:CFLAGS=$CFLAGS:" \ + -e "s:^DEBUGFLAGS=.*:DEBUGFLAGS=$DEBUGFLAGS:" \ -e "s:^CPPFLAGS=.*:CPPFLAGS=$CPPFLAGS:" \ -e "s:^LDFLAGS=.*:LDFLAGS=$LDFLAGS:" \ -e "s:^IRCDLIBS=.*:IRCDLIBS=$IRCDLIBS:" \ diff --git a/include/supported.h b/include/supported.h index 77b369c..3e91148 100644 --- a/include/supported.h +++ b/include/supported.h @@ -48,7 +48,7 @@ " KICKLEN=%i" \ " CHANTYPES=%s" -#define FEATURESVALUES 15,MAXMODEPARAMS,MAXCHANNELSPERUSER,MAXBANS, \ +#define FEATURESVALUES MAXSILES,MAXMODEPARAMS,MAXCHANNELSPERUSER,MAXBANS, \ NICKLEN,TOPICLEN,TOPICLEN,"+#&" #endif /* INCLUDED_supported_h */ diff --git a/ircd/Makefile.in b/ircd/Makefile.in index 189cd0a..9944fc0 100644 --- a/ircd/Makefile.in +++ b/ircd/Makefile.in @@ -53,12 +53,16 @@ RPATH= CC= CFLAGS= CPPFLAGS= +DEBUGFLAGS= LDFLAGS= IRCDLIBS= #### End of system configuration section. #### PURIFY = +CFLAGS += $(DEBUGFLAGS) +LDFLAGS += $(DEBUGFLAGS) + SRC = \ IPcheck.c \ channel.c \ diff --git a/ircd/ircd.c b/ircd/ircd.c index ad4ba77..6012ea5 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -79,11 +79,6 @@ *--------------------------------------------------------------------------*/ extern void init_counters(void); -#ifdef PROFIL -extern etext(void); -#endif - - /*---------------------------------------------------------------------------- * Constants / Enums *--------------------------------------------------------------------------*/ @@ -608,12 +603,6 @@ static int set_userid_if_needed(void) { * long and ugly control paths... -smd *--------------------------------------------------------------------------*/ int main(int argc, char **argv) { -#ifdef PROFIL - monstartup(0, etext); - moncontrol(1); - signal(SIGUSR1, s_monitor); -#endif - CurrentTime = time(NULL); thisServer.argc = argc; @@ -720,3 +709,4 @@ int main(int argc, char **argv) { return 0; } + diff --git a/ircd/ircd_signal.c b/ircd/ircd_signal.c index 04e25cd..2ee429b 100644 --- a/ircd/ircd_signal.c +++ b/ircd/ircd_signal.c @@ -29,17 +29,6 @@ static struct tag_SignalCounter { unsigned int hup; } SignalCounter; -#ifdef PROFIL -void s_monitor(int sig) -{ - static int mon = 0; - - moncontrol(mon); - mon = 1 - mon; -} - -#endif - void sigalrm_handler(int sig) { ++SignalCounter.alrm; diff --git a/ircd/s_misc.c b/ircd/s_misc.c index c5d26f4..a5b122c 100644 --- a/ircd/s_misc.c +++ b/ircd/s_misc.c @@ -389,23 +389,6 @@ int exit_client(struct Client *cptr, /* Connection being handled by if (MyConnect(victim)) { victim->flags |= FLAGS_CLOSING; -#ifdef ALLOW_SNO_CONNEXIT -#ifdef SNO_CONNEXIT_IP - if (IsUser(victim)) { - sendto_opmask_butone(0, SNO_CONNEXIT, - "Client exiting: %s (%s@%s) [%s] [%s]", - victim->name, victim->user->username, - victim->user->host, comment, - ircd_ntoa((const char *)&victim->ip)); - } -#else /* SNO_CONNEXIT_IP */ - if (IsUser(victim)) { - sendto_opmask_butone(0, SNO_CONNEXIT, "Client exiting: %s (%s@%s) [%s]", - victim->name, victim->user->username, - victim->user->host, comment); - } -#endif /* SNO_CONNEXIT_IP */ -#endif /* ALLOW_SNO_CONNEXIT */ update_load(); #ifdef FNAME_USERLOG on_for = CurrentTime - victim->firsttime; diff --git a/ircd/s_user.c b/ircd/s_user.c index 17ebfb5..a7c0c03 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -627,16 +627,6 @@ int register_user(struct Client *cptr, struct Client *sptr, nextping = CurrentTime; if (sptr->snomask & SNO_NOISY) set_snomask(sptr, sptr->snomask & SNO_NOISY, SNO_ADD); -#ifdef ALLOW_SNO_CONNEXIT -#ifdef SNO_CONNEXIT_IP - sendto_opmask_butone(0, SNO_CONNEXIT, "Client connecting: %s (%s@%s) " - "[%s] {%d}", nick, user->username, user->host, - cptr->sock_ip, get_client_class(sptr)); -#else /* SNO_CONNEXIT_IP */ - sendto_opmask_butone(0, SNO_CONEXIT, "Client connecting: %s (%s@%s)", - nick, user->username, user->host); -#endif /* SNO_CONNEXIT_IP */ -#endif /* ALLOW_SNO_CONNEXIT */ IPcheck_connect_succeeded(sptr); } else -- 2.20.1