m_info: Add some missing things

This commit is contained in:
Ed Kellett 2020-11-09 14:50:08 +00:00
parent 828f8ffada
commit 2707630451

View 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",
@ -408,6 +421,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 +586,16 @@ static struct InfoStruct info_table[] = {
"Send messages to @#channel if affected by +z",
INFO_INTBOOL_YN(&ConfigChannel.opmod_send_statusmsg),
},
{
"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",
@ -787,6 +815,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]",