commit - 79ca5fe04d0081468aa09cf0a7caca45a45b9864
commit + 8ea1c5bb82e224326d1a73c462c74dfcb5badef6
blob - 4804f2bb378b8e8b5578580e5119ecea6818103d
blob + 4a255b26b81ae56834db34434a904b620dea8a29
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
#include "conf.h"
-static bool Use_Log = true;
+static bool Use_Log = true, Using_MotdFile = true;
static CONF_SERVER New_Server;
static int New_Server_Idx;
printf(" AdminInfo1 = %s\n", Conf_ServerAdmin1);
printf(" AdminInfo2 = %s\n", Conf_ServerAdmin2);
printf(" AdminEMail = %s\n", Conf_ServerAdminMail);
- printf(" MotdFile = %s\n", Conf_MotdFile);
- printf(" MotdPhrase = %.32s\n", array_bytes(&Conf_Motd) ? (const char*) array_start(&Conf_Motd) : "");
+ if (Using_MotdFile) {
+ printf(" MotdFile = %s\n", Conf_MotdFile);
+ printf(" MotdPhrase =\n");
+ } else {
+ printf(" MotdFile = \n");
+ printf(" MotdPhrase = %s\n", array_bytes(&Conf_Motd)
+ ? (const char*) array_start(&Conf_Motd) : "");
+ }
printf(" ChrootDir = %s\n", Conf_Chroot);
printf(" PidFile = %s\n", Conf_PidFile);
printf(" Listen = %s\n", Conf_ListenAddress);
}
array_free(&Conf_Motd);
+ Using_MotdFile = true;
while (fgets(line, (int)sizeof line, fp)) {
ngt_TrimLastChr( line, '\n');
if (!array_copyb(&Conf_Motd, Arg, len + 1))
Config_Error(LOG_WARNING, "%s, line %d: Could not append MotdPhrase: %s",
NGIRCd_ConfFile, Line, strerror(errno));
+ Using_MotdFile = false;
return;
}
if( strcasecmp( Var, "ChrootDir" ) == 0 ) {