Author: Isomer <isomer@coders.net>
authorPerry Lorier <isomer@undernet.org>
Tue, 8 Jan 2002 10:39:32 +0000 (10:39 +0000)
committerPerry Lorier <isomer@undernet.org>
Tue, 8 Jan 2002 10:39:32 +0000 (10:39 +0000)
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
Makefile.in
ircd/m_quit.c

index 66894a0e915a6d91485fbf2f9e4a1f8fc6d895f3..cc8a9caeae7041f03f3d22ce1bf39c0eadea375e 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-08  Perry Lorier  <isomer@coders.net>
+       * 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  <isomer@coders.net>
        * Minor fixes to the below
 
index 0ab281d38103ef119b38ec0f441ed6b322c35332..2b3f0faa4a2891163bd3f71cf3e3ddf079d87d1c 100644 (file)
@@ -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 ..; \
index 7d6015ac5839ad096e1af9166bce4119ec4f3355..38d47e29d5c74ae74bc63cb65557b3cc9a7a20d1 100644 (file)
@@ -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);
 }