Module: ngircd.git Branch: master Commit: 950aeec3ff0e15c456ac32d8fecee8c73f7c5df3 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=950ae...
Author: Alexander Barton alex@barton.de Date: Tue Jan 1 19:25:06 2013 +0100
Use "${docdir}/Commands.txt" as help text file
---
configure.ng | 4 ++-- contrib/MacOSX/config.h | 3 ++- doc/Makefile.am | 3 ++- doc/sample-ngircd.conf.tmpl | 2 +- src/ngircd/conf.c | 4 ++-- src/ngircd/defines.h | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/configure.ng b/configure.ng index 84e2750..732e55e 100644 --- a/configure.ng +++ b/configure.ng @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors +# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -110,7 +110,7 @@ esac # Add additional CFLAGS, eventually specified on the command line: test -n "$CFLAGS_ADD" && CFLAGS="$CFLAGS $CFLAGS_ADD"
-CFLAGS="$CFLAGS -DSYSCONFDIR='"$(sysconfdir)"'" +CFLAGS="$CFLAGS -DSYSCONFDIR='"$(sysconfdir)"' -DDOCDIR='"$(docdir)"'"
# -- Headers --
diff --git a/contrib/MacOSX/config.h b/contrib/MacOSX/config.h index 6da7496..f483827 100644 --- a/contrib/MacOSX/config.h +++ b/contrib/MacOSX/config.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ #define VERSION "??("__DATE__")" #endif #define SYSCONFDIR "/etc/ngircd" +#define DOCDIR "/usr/share/doc/ngircd"
#ifndef TARGET_VENDOR #define TARGET_VENDOR "apple" diff --git a/doc/Makefile.am b/doc/Makefile.am index eb6fa93..04f74b6 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors +# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,6 +12,7 @@ .tmpl: $(AM_V_GEN)sed \ -e "s@:ETCDIR:@${sysconfdir}@" \ + -e "s@:DOCDIR:@${docdir}@" \ <$< >$@
SUFFIXES = .tmpl diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl index 3f80a9f..1c3998a 100644 --- a/doc/sample-ngircd.conf.tmpl +++ b/doc/sample-ngircd.conf.tmpl @@ -35,7 +35,7 @@
# Text file which contains the ngIRCd help text. This file is required # to display help texts when using the "HELP <cmd>" command. - ;HelpFile = :ETCDIR:/ngircd.help + ;HelpFile = :DOCDIR:/Commands.txt
# Info text of the server. This will be shown by WHOIS and # LINKS requests for example. diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index fa1bfba..d5a28bd 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -706,7 +706,7 @@ Set_Defaults(bool InitServers) array_free(&Conf_Helptext); strlcpy(Conf_MotdFile, SYSCONFDIR, sizeof(Conf_MotdFile)); strlcat(Conf_MotdFile, MOTD_FILE, sizeof(Conf_MotdFile)); - strlcpy(Conf_HelpFile, SYSCONFDIR, sizeof(Conf_HelpFile)); + strlcpy(Conf_HelpFile, DOCDIR, sizeof(Conf_HelpFile)); strlcat(Conf_HelpFile, HELP_FILE, sizeof(Conf_HelpFile)); strcpy(Conf_ServerPwd, ""); strlcpy(Conf_PidFile, PID_FILE, sizeof(Conf_PidFile)); diff --git a/src/ngircd/defines.h b/src/ngircd/defines.h index 28a260b..3850b58 100644 --- a/src/ngircd/defines.h +++ b/src/ngircd/defines.h @@ -78,7 +78,7 @@ #define MOTD_FILE "/ngircd.motd"
/** Name of the help file. */ -#define HELP_FILE "/ngircd.help" +#define HELP_FILE "/Commands.txt"
/** Default chroot() directory. */ #define CHROOT_DIR ""