Add general::secret_channels_in_whois.
This commit is contained in:
parent
763e2baade
commit
837a020a0c
|
@ -468,6 +468,7 @@ general {
|
|||
map_oper_only = no;
|
||||
operspy_admin_only = no;
|
||||
operspy_dont_care_user_info = no;
|
||||
secret_channels_in_whois = no;
|
||||
caller_id_wait = 1 minute;
|
||||
pace_wait_simple = 1 second;
|
||||
pace_wait = 10 seconds;
|
||||
|
|
|
@ -1100,6 +1100,12 @@ general {
|
|||
* protected. */
|
||||
operspy_dont_care_user_info = no;
|
||||
|
||||
/* secret channels in whois: display secret channels in /whois
|
||||
* even if operspy was not used, as long as the oper doing the
|
||||
* whois has the oper:spy priv. this will not send any kind of
|
||||
* server notice. */
|
||||
secret_channels_in_whois = no;
|
||||
|
||||
/* caller id wait: time between notifying a +g user that somebody
|
||||
* is messaging them.
|
||||
*/
|
||||
|
|
|
@ -216,6 +216,7 @@ struct config_file_entry
|
|||
int default_umodes;
|
||||
int global_snotices;
|
||||
int operspy_dont_care_user_info;
|
||||
int secret_channels_in_whois;
|
||||
};
|
||||
|
||||
struct config_channel_entry
|
||||
|
|
|
@ -356,6 +356,12 @@ static struct InfoStruct info_table[] = {
|
|||
&ConfigFileEntry.operspy_dont_care_user_info,
|
||||
"Remove accountability and some '!' requirement from non-channel operspy"
|
||||
},
|
||||
{
|
||||
"secret_channels_in_whois",
|
||||
OUTPUT_BOOLEAN,
|
||||
&ConfigFileEntry.secret_channels_in_whois,
|
||||
"Defines whether secret channels are always shown in whois to opers with oper:spy priv."
|
||||
},
|
||||
{
|
||||
"pace_wait",
|
||||
OUTPUT_DECIMAL,
|
||||
|
|
|
@ -242,6 +242,10 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
|||
int extra_space = 0;
|
||||
int i;
|
||||
char *m;
|
||||
int showsecret = 0;
|
||||
|
||||
if(ConfigFileEntry.secret_channels_in_whois && IsOperSpy(source_p))
|
||||
showsecret = 1;
|
||||
|
||||
if(target_p->user == NULL)
|
||||
{
|
||||
|
@ -281,7 +285,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
|||
|
||||
visible = ShowChannel(source_p, chptr);
|
||||
|
||||
if(visible || operspy)
|
||||
if(visible || operspy || showsecret)
|
||||
{
|
||||
if((cur_len + strlen(chptr->chname) + 3) > (BUFSIZE - 5))
|
||||
{
|
||||
|
|
|
@ -2177,6 +2177,7 @@ static struct ConfEntry conf_general_table[] =
|
|||
{ "no_oper_flood", CF_YESNO, NULL, 0, &ConfigFileEntry.no_oper_flood },
|
||||
{ "operspy_admin_only", CF_YESNO, NULL, 0, &ConfigFileEntry.operspy_admin_only },
|
||||
{ "operspy_dont_care_user_info", CF_YESNO, NULL, 0, &ConfigFileEntry.operspy_dont_care_user_info },
|
||||
{ "secret_channels_in_whois", CF_YESNO, NULL, 0, &ConfigFileEntry.secret_channels_in_whois },
|
||||
{ "pace_wait", CF_TIME, NULL, 0, &ConfigFileEntry.pace_wait },
|
||||
{ "pace_wait_simple", CF_TIME, NULL, 0, &ConfigFileEntry.pace_wait_simple },
|
||||
{ "ping_cookie", CF_YESNO, NULL, 0, &ConfigFileEntry.ping_cookie },
|
||||
|
|
|
@ -735,6 +735,7 @@ set_default_conf(void)
|
|||
ConfigFileEntry.collision_fnc = YES;
|
||||
ConfigFileEntry.global_snotices = YES;
|
||||
ConfigFileEntry.operspy_dont_care_user_info = NO;
|
||||
ConfigFileEntry.secret_channels_in_whois = NO;
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
ConfigFileEntry.compression_level = 4;
|
||||
|
|
Loading…
Reference in New Issue