]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_conf.c
s/owner/admin/ throughout the source code and docs.
[irc/rqf/shadowircd.git] / src / s_conf.c
index 2257fb10ce81f4e9bfa3b8dd5e0e5bc41930b057..c6a1770d5c63ace5b24aef2f33b9f2c98612a1da 100644 (file)
@@ -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,7 @@ 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.servicestring = rb_strdup("is a Network Service");
 
        ConfigFileEntry.default_umodes = UMODE_INVISIBLE;       
@@ -735,6 +737,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;
@@ -745,10 +748,15 @@ set_default_conf(void)
        ConfigFileEntry.oper_only_umodes = UMODE_SERVNOTICE;
        ConfigFileEntry.oper_snomask = SNO_GENERAL;
 
+       ConfigChannel.autochanmodes = rb_strdup("nt");
+       ConfigChannel.exemptchanops = rb_strdup("");
+       ConfigChannel.use_halfop = YES;
+       ConfigChannel.use_admin = YES;
        ConfigChannel.use_except = YES;
        ConfigChannel.use_invex = YES;
        ConfigChannel.use_knock = YES;
        ConfigChannel.use_forward = YES;
+       ConfigChannel.use_local_channels = YES;
        ConfigChannel.knock_delay = 300;
        ConfigChannel.knock_delay_channel = 60;
        ConfigChannel.max_chans_per_user = 15;
@@ -765,6 +773,15 @@ set_default_conf(void)
        ConfigChannel.no_join_on_split = NO;
        ConfigChannel.no_create_on_split = YES;
        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;
@@ -782,6 +799,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;
 
@@ -860,6 +878,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()