]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_conf.c
Allow clearing general::kline_reason via a rehash.
[irc/rqf/shadowircd.git] / src / s_conf.c
index d689fb0c0699f04c9b4a1446249d11d8032867cf..11f6f2a9e96b1b9c1dbb29e0dcc4a6360cd8aa1d 100644 (file)
@@ -50,7 +50,7 @@
 
 struct config_server_hide ConfigServerHide;
 
-extern int yyparse();          /* defined in y.tab.c */
+extern int yyparse(void);              /* defined in y.tab.c */
 extern char linebuf[];
 
 #ifndef INADDR_NONE
@@ -308,7 +308,8 @@ verify_access(struct Client *client_p, const char *username)
                aconf = find_address_conf(client_p->host, client_p->sockhost, 
                                        client_p->username, client_p->username,
                                        (struct sockaddr *) &client_p->localClient->ip,
-                                       client_p->localClient->ip.ss_family);
+                                       client_p->localClient->ip.ss_family,
+                                       client_p->localClient->auth_user);
        }
        else
        {
@@ -317,7 +318,8 @@ verify_access(struct Client *client_p, const char *username)
                aconf = find_address_conf(client_p->host, client_p->sockhost,
                                        non_ident, client_p->username,
                                        (struct sockaddr *) &client_p->localClient->ip,
-                                       client_p->localClient->ip.ss_family);
+                                       client_p->localClient->ip.ss_family,
+                                       client_p->localClient->auth_user);
        }
 
        if(aconf == NULL)
@@ -770,7 +772,6 @@ set_default_conf(void)
        ConfigFileEntry.hide_error_messages = 1;
        ConfigFileEntry.dots_in_ident = 0;
        ConfigFileEntry.max_targets = MAX_TARGETS_DEFAULT;
-       ConfigFileEntry.servlink_path = rb_strdup(SLPATH);
        ConfigFileEntry.egdpool_path = NULL;
        ConfigFileEntry.use_whois_actually = YES;
        ConfigFileEntry.burst_away = NO;
@@ -818,7 +819,8 @@ set_default_conf(void)
         ConfigFileEntry.reject_after_count = 5;
        ConfigFileEntry.reject_ban_time = 300;  
        ConfigFileEntry.reject_duration = 120;
-       ConfigFileEntry.max_unknown_ip = 2;
+       ConfigFileEntry.throttle_count = 4;
+       ConfigFileEntry.throttle_duration = 60;
 
        ServerInfo.default_max_clients = MAXCONNECTIONS;
 }
@@ -855,9 +857,6 @@ validate_conf(void)
        if(ConfigFileEntry.ts_max_delta < TS_MAX_DELTA_MIN)
                ConfigFileEntry.ts_max_delta = TS_MAX_DELTA_DEFAULT;
 
-       if(ConfigFileEntry.servlink_path == NULL)
-               ConfigFileEntry.servlink_path = rb_strdup(SLPATH);
-
        if(ServerInfo.network_name == NULL)
                ServerInfo.network_name = rb_strdup(NETWORK_NAME_DEFAULT);
 
@@ -898,12 +897,6 @@ validate_conf(void)
        }
 }
 
-/*
- * lookup_confhost - start DNS lookups of all hostnames in the conf
- * line and convert an IP addresses in a.b.c.d number for to IP#s.
- *
- */
-
 /* add_temp_kline()
  *
  * inputs        - pointer to struct ConfItem
@@ -936,7 +929,7 @@ add_temp_kline(struct ConfItem *aconf)
        }
 
        aconf->flags |= CONF_FLAGS_TEMPORARY;
-       add_conf_by_address(aconf->host, CONF_KILL, aconf->user, aconf);
+       add_conf_by_address(aconf->host, CONF_KILL, aconf->user, NULL, aconf);
 }
 
 /* add_temp_dline()
@@ -970,7 +963,7 @@ add_temp_dline(struct ConfItem *aconf)
        }
 
        aconf->flags |= CONF_FLAGS_TEMPORARY;
-       add_conf_by_address(aconf->host, CONF_DLINE, aconf->user, aconf);
+       add_conf_by_address(aconf->host, CONF_DLINE, aconf->user, NULL, aconf);
 }
 
 /* expire_tkline()
@@ -1238,8 +1231,8 @@ clear_out_old_conf(void)
         */
 
        /* clean out general */
-       rb_free(ConfigFileEntry.servlink_path);
-       ConfigFileEntry.servlink_path = NULL;
+       rb_free(ConfigFileEntry.kline_reason);
+       ConfigFileEntry.kline_reason = NULL;
 
        RB_DLINK_FOREACH_SAFE(ptr, next_ptr, service_list.head)
        {
@@ -1480,7 +1473,7 @@ conf_add_d_conf(struct ConfItem *aconf)
        }
        else
        {
-               add_conf_by_address(aconf->host, CONF_DLINE, NULL, aconf);
+               add_conf_by_address(aconf->host, CONF_DLINE, NULL, NULL, aconf);
        }
 }