branding: if CUSTOM_BRANDING is defined, display charybdis version in /info

(based on ircd-seven rebrand patch)
This commit is contained in:
William Pitcock 2011-05-08 09:06:19 -05:00
parent b6d0720c1c
commit f5493691ed
5 changed files with 20 additions and 0 deletions

6
configure vendored
View file

@ -7490,6 +7490,12 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then
$as_echo "#define CUSTOM_BRANDING 1" >>confdefs.h
fi
if test ! -z "$SELECT_TYPE_EXPLICIT"; then
SELECT_TYPE="$SELECT_TYPE_EXPLICIT";
echo "Forcing $SELECT_TYPE to be enabled"

View file

@ -682,6 +682,10 @@ AC_HELP_STRING([--with-custom-version=NAME],
AC_DEFINE_UNQUOTED(BRANDING_NAME, ["$BRANDING_NAME"], [Custom branding name.])
AC_DEFINE_UNQUOTED(BRANDING_VERSION, ["$BRANDING_VERSION"], [Custom branding name.])
if test "x$BRANDING_NAME" != "x$PACKAGE_NAME"; then
AC_DEFINE(CUSTOM_BRANDING, 1, [Define if custom branding is enabled.])
fi
if test ! -z "$SELECT_TYPE_EXPLICIT"; then
SELECT_TYPE="$SELECT_TYPE_EXPLICIT";
echo "Forcing $SELECT_TYPE to be enabled"

View file

@ -32,6 +32,9 @@
*/
#undef CRAY_STACKSEG_END
/* Define if custom branding is enabled. */
#undef CUSTOM_BRANDING
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA

View file

@ -95,6 +95,9 @@ mo_version(struct Client *client_p, struct Client *source_p, int parc, const cha
{
sendto_one_numeric(source_p, RPL_VERSION, form_str(RPL_VERSION),
ircd_version, serno,
#ifdef CUSTOM_BRANDING
PACKAGE_NAME " " PACKAGE_VERSION,
#endif
me.name, confopts(source_p), TS_CURRENT,
ServerInfo.sid);
show_isupport(source_p);

View file

@ -372,7 +372,11 @@ static const char * replies[] = {
/* 348 RPL_EXCEPTLIST */ ":%s 348 %s %s %s %s %lu",
/* 349 RPL_ENDOFEXCEPTLIST */ ":%s 349 %s %s :End of Channel Exception List",
/* 350 */ NULL,
#ifndef CUSTOM_BRANDING
/* 351 RPL_VERSION, */ "%s(%s). %s :%s TS%dow %s",
#else
/* 351 RPL_VERSION, */ "%s(%s, %s). %s :%s TS%dow %s",
#endif
/* 352 RPL_WHOREPLY, */ ":%s 352 %s %s %s %s %s %s %s :%d %s",
/* 353 RPL_NAMREPLY, */ ":%s 353 %s %s %s :",
/* 354 RPL_WHOSPCRPL */ NULL,