X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/0eceaff17a0fd935caa086ee43b328b0ea9282a5..e78f68507356cd9f9a5bf9c03c9db61a7d00b9f4:/src/s_conf.c diff --git a/src/s_conf.c b/src/s_conf.c index 5eb07d5..ef704d2 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -30,6 +30,7 @@ #include "s_newconf.h" #include "newconf.h" #include "s_serv.h" +#include "s_user.h" #include "s_stats.h" #include "channel.h" #include "class.h" @@ -680,6 +681,8 @@ set_default_conf(void) ConfigFileEntry.default_operstring = rb_strdup("is an IRC operator"); ConfigFileEntry.default_adminstring = rb_strdup("is a Server Administrator"); + ConfigFileEntry.default_operhost = rb_strdup(""); + ConfigFileEntry.static_quit = rb_strdup(""); ConfigFileEntry.servicestring = rb_strdup("is a Network Service"); ConfigFileEntry.default_umodes = UMODE_INVISIBLE; @@ -693,6 +696,7 @@ set_default_conf(void) ConfigFileEntry.nick_delay = 900; /* 15 minutes */ ConfigFileEntry.target_change = YES; ConfigFileEntry.anti_spam_exit_message_time = 0; + ConfigFileEntry.use_part_messages = YES; ConfigFileEntry.ts_warn_delta = TS_WARN_DELTA_DEFAULT; ConfigFileEntry.ts_max_delta = TS_MAX_DELTA_DEFAULT; ConfigFileEntry.client_exit = YES; @@ -747,8 +751,9 @@ set_default_conf(void) ConfigFileEntry.oper_snomask = SNO_GENERAL; ConfigChannel.autochanmodes = rb_strdup("nt"); + ConfigChannel.exemptchanops = rb_strdup(""); ConfigChannel.use_halfop = YES; - ConfigChannel.use_owner = YES; + ConfigChannel.use_admin = YES; ConfigChannel.use_except = YES; ConfigChannel.use_invex = YES; ConfigChannel.use_knock = YES; @@ -772,6 +777,14 @@ set_default_conf(void) ConfigChannel.resv_forcepart = YES; ConfigChannel.kick_no_rejoin_time = 30; + ConfigChannel.exempt_cmode_c = NO; + ConfigChannel.exempt_cmode_C = NO; + ConfigChannel.exempt_cmode_D = NO; + ConfigChannel.exempt_cmode_T = NO; + ConfigChannel.exempt_cmode_N = NO; + ConfigChannel.exempt_cmode_G = NO; + ConfigChannel.exempt_cmode_K = NO; + ConfigServerHide.flatten_links = 0; ConfigServerHide.links_delay = 300; ConfigServerHide.hidden = 0; @@ -788,6 +801,7 @@ set_default_conf(void) ConfigFileEntry.reject_duration = 120; ConfigFileEntry.throttle_count = 4; ConfigFileEntry.throttle_duration = 60; + ConfigFileEntry.expire_override_time = 300; ServerInfo.default_max_clients = MAXCONNECTIONS; @@ -866,6 +880,52 @@ validate_conf(void) splitmode = 0; splitchecking = 0; } + + if(!valid_hostname(ConfigFileEntry.default_operhost)) + { + conf_report_error("Warning -- invalid default_operhost specified, ignoring."); + ConfigFileEntry.default_operhost = rb_strdup(""); + } + + /* Parse the exemptchanops option and set the internal variables + * that we will use. */ + char * ech; + + for(ech = ConfigChannel.exemptchanops; *ech; ech++) + { + if(*ech == 'c') + { + ConfigChannel.exempt_cmode_c = 1; + continue; + } + if(*ech == 'C') + { + ConfigChannel.exempt_cmode_C = 1; + continue; + } + if(*ech == 'D') + { + ConfigChannel.exempt_cmode_D = 1; + continue; + } + if(*ech == 'T') + { + ConfigChannel.exempt_cmode_T = 1; + continue; + } + if(*ech == 'N') + { + ConfigChannel.exempt_cmode_N = 1; + continue; + } + if(*ech == 'G') + { + ConfigChannel.exempt_cmode_G = 1; + continue; + } + if(*ech == 'K') + ConfigChannel.exempt_cmode_K = 1; + } } /* add_temp_kline()