From b8294f6c0db86ec8d204b0fda51070f3a415fb57 Mon Sep 17 00:00:00 2001 From: Perry Lorier Date: Tue, 8 Jan 2002 10:39:32 +0000 Subject: [PATCH] Author: Isomer Log message: * Fixed the build system, "MAKEFILES" is not a general purpose variable in a makefile -- it implicitly includes the other makefiles. And it appears to have shown up some bug in Make too. Funky! * Added "Quit: " prefixes to quit messages. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@595 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog.11 | 5 +++++ Makefile.in | 16 ++++++++-------- ircd/m_quit.c | 15 +++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/ChangeLog.11 b/ChangeLog.11 index 66894a0..cc8a9ca 100644 --- a/ChangeLog.11 +++ b/ChangeLog.11 @@ -1,3 +1,8 @@ +2002-01-08 Perry Lorier + * Fixed the build system -- MAKEFILES is *not* a variable you can + just use in a makefile :) + * Added "Quit: " prefix to quit messages. + 2001-10-14 Perry Lorier * Minor fixes to the below diff --git a/Makefile.in b/Makefile.in index 0ab281d..2b3f0fa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ AWK = @AWK@ #### End of system configuration section. #### SUBDIRS = doc ircd -MAKEFILES = Makefile doc/Makefile ircd/Makefile +IRCD_MAKEFILES = Makefile doc/Makefile ircd/Makefile all: build @@ -37,7 +37,7 @@ all: build # Some versions of make give a warning when this is empty: .SUFFIXES: .dummy -build: ${MAKEFILES} +build: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Building $$i..."; \ cd $$i; ${MAKE} build; cd ..; \ @@ -63,7 +63,7 @@ root-clean: test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \ done || true -sub-clean: ${MAKEFILES} +sub-clean: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Cleaning $$i..."; \ cd $$i; ${MAKE} clean; cd ..;\ @@ -78,7 +78,7 @@ root-distclean: root-clean test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \ done || true -sub-distclean: ${MAKEFILES} +sub-distclean: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Dist-cleaning $$i..."; \ cd $$i; ${MAKE} distclean; cd ..;\ @@ -88,26 +88,26 @@ distclean: root-distclean sub-distclean ${RM} -f Makefile config.h config.log config.cache config.status \ stamp-h -maintainer-clean: root-distclean ${MAKEFILES} +maintainer-clean: root-distclean ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "maintainer-cleaning $$i..."; \ cd $$i; ${MAKE} maintainer-clean; cd ..;\ done -depend: ${MAKEFILES} +depend: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Making dependencies in $$i..."; \ cd $$i; ${MAKE} depend; cd ..; \ done -install: ${MAKEFILES} +install: ${IRCD_MAKEFILES} test -d ${prefix} || mkdir ${prefix} @for i in ${SUBDIRS}; do \ echo "Installing $$i..."; \ cd $$i; ${MAKE} install; cd ..; \ done -uninstall: ${MAKEFILES} +uninstall: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Uninstalling $$i..."; \ cd $$i; ${MAKE} uninstall; cd ..; \ diff --git a/ircd/m_quit.c b/ircd/m_quit.c index 7d6015a..38d47e2 100644 --- a/ircd/m_quit.c +++ b/ircd/m_quit.c @@ -99,7 +99,7 @@ */ int m_quit(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { - char* comment; + char comment[TOPICLEN]; assert(0 != cptr); assert(0 != sptr); assert(cptr == sptr); @@ -111,15 +111,14 @@ int m_quit(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) return exit_client(cptr, sptr, sptr, "Signed off"); } } - comment = cli_name(cptr); if (parc > 1) { - comment = parv[parc - 1]; - - if (0 == strncmp("Local kill", comment, 10) || 0 == strncmp(comment, "Killed", 6)) - comment = cli_name(cptr); - else if (strlen(comment) > TOPICLEN) - comment[TOPICLEN] = '\0'; + strcpy(comment,"Quit: "); + strncat(comment,parv[parc-1],sizeof(comment)-strlen("Quit: ")); + comment[sizeof(comment)] = '\0'; + } + else { + strncpy(comment,cli_name(cptr),sizeof(comment)); } return exit_client(cptr, sptr, sptr, comment); } -- 2.20.1