X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconf.c;h=6bd224f3c11ea58189d081beb361d97783bf721f;hp=4da5b9e0742ac55ccc6c2c3276ce3d184443c751;hb=f087c68a99951d12ba91c5f6e1e0e548c5a5d912;hpb=391cf4e2a11a1ca3969cb01db062037a9cd8caf3 diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index 4da5b9e0..6bd224f3 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -374,6 +374,7 @@ Conf_Test( void ) #ifndef STRICT_RFC printf(" RequireAuthPing = %s\n", yesno_to_str(Conf_AuthPing)); #endif + printf(" ScrubCTCP = %s\n", yesno_to_str(Conf_ScrubCTCP)); #ifdef SSL_SUPPORT printf(" SSLCertFile = %s\n", Conf_SSLOptions.CertFile); printf(" SSLDHFile = %s\n", Conf_SSLOptions.DHFile); @@ -687,6 +688,7 @@ Set_Defaults(bool InitServers) #endif Conf_PredefChannelsOnly = false; #ifdef SYSLOG + Conf_ScrubCTCP = false; #ifdef LOG_LOCAL5 Conf_SyslogFacility = LOG_LOCAL5; #else @@ -1459,6 +1461,10 @@ Handle_OPTIONS(int Line, char *Var, char *Arg) return; } #endif + if (strcasecmp(Var, "ScrubCTCP") == 0) { + Conf_ScrubCTCP = Check_ArgIsTrue(Arg); + return; + } #ifdef SSL_SUPPORT if (strcasecmp(Var, "SSLCertFile") == 0) { assert(Conf_SSLOptions.CertFile == NULL); @@ -1933,8 +1939,13 @@ va_dcl vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap ); va_end( ap ); - if (Use_Log) Log( Level, "%s", msg ); - else puts( msg ); + if (!Use_Log) { + if (Level <= LOG_WARNING) + printf(" - %s\n", msg); + else + puts(msg); + } else + Log(Level, "%s", msg); } #ifdef DEBUG