]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/conf.c
New configuration opion "MorePrivacy" to "censor" some user information
[ngircd.git] / src / ngircd / conf.c
index 4da5b9e0742ac55ccc6c2c3276ce3d184443c751..c947997215773e7e486ba586648ee32349b1aa24 100644 (file)
@@ -364,6 +364,7 @@ Conf_Test( void )
 #ifdef IDENT
        printf("  Ident = %s\n", yesno_to_str(Conf_Ident));
 #endif
+       printf("  MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
        printf("  NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
        printf("  OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
        printf("  OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
@@ -677,6 +678,7 @@ Set_Defaults(bool InitServers)
 #else
        Conf_Ident = false;
 #endif
+       Conf_MorePrivacy = false;
        Conf_NoticeAuth = false;
        Conf_OperCanMode = false;
        Conf_OperServerMode = false;
@@ -1432,6 +1434,10 @@ Handle_OPTIONS(int Line, char *Var, char *Arg)
                WarnIdent(Line);
                return;
        }
+       if (strcasecmp(Var, "MorePrivacy") == 0) {
+               Conf_MorePrivacy = Check_ArgIsTrue(Arg);
+               return;
+       }
        if (strcasecmp(Var, "NoticeAuth") == 0) {
                Conf_NoticeAuth = Check_ArgIsTrue(Arg);
                return;
@@ -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