]> jfr.im git - solanum.git/blobdiff - modules/m_info.c
reference.conf: add drain_reason
[solanum.git] / modules / m_info.c
index ecb9f7b394eba1fedd6b51c5b515a9b478d8a451..d1b286f68612ac03631ffdc5ed29155dabdef162 100644 (file)
@@ -74,6 +74,7 @@ enum info_output_type {
        OUTPUT_INTBOOL,    /* BOOLEAN encoded as an int */
        OUTPUT_INTBOOL_YN, /* BOOLEAN_YN encoded as an int */
        OUTPUT_YESNOMASK,  /* Output option as "YES/NO/MASKED" */
+       OUTPUT_STATSL,     /* Output as "YES/NO/SELF" */
 };
 
 #define INFO_STRING(ptr)      OUTPUT_STRING,     .option.string_p = (ptr)
@@ -84,6 +85,7 @@ enum info_output_type {
 #define INFO_INTBOOL_YN(ptr)  OUTPUT_INTBOOL_YN, .option.int_ = (ptr)
 #define INFO_YESNOMASK(ptr)   OUTPUT_YESNOMASK,  .option.int_ = (ptr)
 #define INFO_DECIMAL(ptr)     OUTPUT_DECIMAL,    .option.int_ = (ptr)
+#define INFO_STATSL(ptr)      OUTPUT_STATSL,     .option.statsl = (ptr)
 
 struct InfoStruct
 {
@@ -96,6 +98,7 @@ struct InfoStruct
                const bool *bool_;
                char *const *string_p;
                const char *string;
+               const enum stats_l_oper_only *statsl;
        } option;
 };
 
@@ -192,6 +195,11 @@ static struct InfoStruct info_table[] = {
                "String shown in whois for opered services.",
                INFO_STRING(&ConfigFileEntry.servicestring),
        },
+       {
+               "drain_reason",
+               "Message to quit users with if this server is draining.",
+               INFO_STRING(&ConfigFileEntry.drain_reason),
+       },
        {
                "disable_auth",
                "Controls whether auth checking is disabled or not",
@@ -288,6 +296,11 @@ static struct InfoStruct info_table[] = {
                "Display K-line reason to client on disconnect",
                INFO_INTBOOL_YN(&ConfigFileEntry.kline_with_reason),
        },
+       {
+               "hide_tkdline_duration",
+               "Hide \"Temporary K-line 123 min.\" from user K/D-lline reasons",
+               INFO_INTBOOL_YN(&ConfigFileEntry.hide_tkdline_duration),
+       },
        {
                "max_accept",
                "Maximum nicknames on accept list",
@@ -393,11 +406,6 @@ static struct InfoStruct info_table[] = {
                "STATS C output is only shown to operators",
                INFO_INTBOOL_YN(&ConfigFileEntry.stats_c_oper_only),
        },
-       {
-               "stats_h_oper_only",
-               "STATS H output is only shown to operators",
-               INFO_INTBOOL_YN(&ConfigFileEntry.stats_h_oper_only),
-       },
        {
                "stats_i_oper_only",
                "STATS I output is only shown to operators",
@@ -408,6 +416,11 @@ static struct InfoStruct info_table[] = {
                "STATS K output is only shown to operators",
                INFO_YESNOMASK(&ConfigFileEntry.stats_k_oper_only),
        },
+       {
+               "stats_l_oper_only",
+               "STATS l/L output is only shown to operators",
+               INFO_STATSL(&ConfigFileEntry.stats_l_oper_only),
+       },
        {
                "stats_o_oper_only",
                "STATS O output is only shown to operators",
@@ -568,6 +581,21 @@ static struct InfoStruct info_table[] = {
                "Send messages to @#channel if affected by +z",
                INFO_INTBOOL_YN(&ConfigChannel.opmod_send_statusmsg),
        },
+       {
+               "ip_bans_through_vhost",
+               "Channel IP bans see through dynamic spoofs",
+               INFO_INTBOOL_YN(&ConfigChannel.ip_bans_through_vhost),
+       },
+       {
+               "hide_opers",
+               "Hide all opers from unprivileged users",
+               INFO_INTBOOL_YN(&ConfigFileEntry.hide_opers),
+       },
+       {
+               "hide_opers_in_whois",
+               "Don't send RPL_WHOISOPERATOR to non-opers",
+               INFO_INTBOOL_YN(&ConfigFileEntry.hide_opers_in_whois),
+       },
        {
                "disable_hidden",
                "Prevent servers from hiding themselves from a flattened /links",
@@ -588,6 +616,11 @@ static struct InfoStruct info_table[] = {
                "Links rehash delay",
                INFO_DECIMAL(&ConfigServerHide.links_delay),
        },
+       {
+               "oper_secure_only",
+               "Require TLS to become an oper",
+               INFO_INTBOOL_YN(&ConfigFileEntry.oper_secure_only),
+       },
 
        { NULL, NULL, 0, { NULL } },
 };
@@ -787,6 +820,14 @@ send_conf_options(struct Client *source_p)
                        opt_value = option ? "YES" : "NO";
                        break;
                }
+               case OUTPUT_STATSL:
+               {
+                       enum stats_l_oper_only option = *info_table[i].option.statsl;
+                       opt_value = option == STATS_L_OPER_ONLY_NO ? "NO" :
+                                   option == STATS_L_OPER_ONLY_SELF ? "SELF" :
+                                   "YES";
+                       break;
+               }
                }
 
                sendto_one(source_p, ":%s %d %s :%-30s %-16s [%s]",