From 0e99e13a711a97dcf853ad2c64889c151ccb5b9b Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Fri, 18 Mar 2016 14:57:08 -0500 Subject: [PATCH] configure: add ENABLE_OPER_CHGHOST flag --- configure.ac | 12 ++++++++++++ include/config.h | 5 ----- include/config.h.dist | 5 ----- include/setup.h.in | 3 +++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index e17ef34f7..614a01607 100644 --- a/configure.ac +++ b/configure.ac @@ -497,6 +497,18 @@ if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then AC_DEFINE(CUSTOM_BRANDING, 1, [Define if custom branding is enabled.]) fi +dnl ********************************************************************** +dnl Enable oper chghost +dnl ********************************************************************** + +AC_ARG_ENABLE(oper-chghost, +AC_HELP_STRING([--enable-oper-chghost],[Allow opers to use the CHGHOST command]), +[operchghost=$enableval],[operchghost=no]) + +if test "$operchghost" = yes; then + AC_DEFINE(ENABLE_OPER_CHGHOST, 1, [Define this to enable opers to use the CHGHOST command.]) +fi + dnl Debug-related options dnl ===================== diff --git a/include/config.h b/include/config.h index 1b5a37b15..752d7bfab 100644 --- a/include/config.h +++ b/include/config.h @@ -72,11 +72,6 @@ */ #undef IGNORE_BOGUS_TS -/* ENABLE_OPER_CHGHOST - * Allow opers to use the CHGHOST command. Potentially abusive. - */ -#undef ENABLE_OPER_CHGHOST - /* HANGONGOODLINK and HANGONRETRYDELAY * Often net breaks for a short time and it's useful to try to * establishing the same connection again faster than CONNECTFREQUENCY diff --git a/include/config.h.dist b/include/config.h.dist index 1b5a37b15..752d7bfab 100644 --- a/include/config.h.dist +++ b/include/config.h.dist @@ -72,11 +72,6 @@ */ #undef IGNORE_BOGUS_TS -/* ENABLE_OPER_CHGHOST - * Allow opers to use the CHGHOST command. Potentially abusive. - */ -#undef ENABLE_OPER_CHGHOST - /* HANGONGOODLINK and HANGONRETRYDELAY * Often net breaks for a short time and it's useful to try to * establishing the same connection again faster than CONNECTFREQUENCY diff --git a/include/setup.h.in b/include/setup.h.in index a66efc100..dca682add 100644 --- a/include/setup.h.in +++ b/include/setup.h.in @@ -41,6 +41,9 @@ /* Size of the dlink_node heap. */ #undef DNODE_HEAP_SIZE +/* Define this to enable opers to use the CHGHOST command. */ +#undef ENABLE_OPER_CHGHOST + /* Prefix where config files are installed. */ #undef ETC_DIR