]> jfr.im git - solanum.git/blobdiff - ircd/s_conf.c
authd/provider: add blacklist provider.
[solanum.git] / ircd / s_conf.c
index 66fa637d9630b14f1b374155d6cfb3df3e520ecf..87520538a9b26184050b9062f18381a8fcaa73e7 100644 (file)
@@ -32,7 +32,6 @@
 #include "channel.h"
 #include "class.h"
 #include "client.h"
-#include "common.h"
 #include "hash.h"
 #include "match.h"
 #include "ircd.h"
@@ -261,7 +260,7 @@ check_client(struct Client *client_p, struct Client *source_p, const char *usern
                {
                        int port = -1;
 #ifdef RB_IPV6
-                       if(source_p->localClient->ip.ss_family == AF_INET6)
+                       if(GET_SS_FAMILY(&source_p->localClient->ip) == AF_INET6)
                                port = ntohs(((struct sockaddr_in6 *)&source_p->localClient->listener->addr)->sin6_port);
                        else
 #endif
@@ -394,7 +393,7 @@ find_address_conf_by_client(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,
+                                       GET_SS_FAMILY(&client_p->localClient->ip),
                                        client_p->localClient->auth_user);
        }
        else
@@ -404,7 +403,7 @@ find_address_conf_by_client(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,
+                                       GET_SS_FAMILY(&client_p->localClient->ip),
                                        client_p->localClient->auth_user);
        }
        return aconf;
@@ -636,10 +635,10 @@ attach_conf(struct Client *client_p, struct ConfItem *aconf)
  * as a result of an operator issuing this command, else assume it has been
  * called as a result of the server receiving a HUP signal.
  */
-int
-rehash(int sig)
+bool
+rehash(bool sig)
 {
-       if(sig != 0)
+       if(sig)
        {
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                     "Got signal SIGHUP, reloading ircd conf. file");
@@ -647,7 +646,7 @@ rehash(int sig)
 
        rehash_authd();
        /* don't close listeners until we know we can go ahead with the rehash */
-       read_conf_files(NO);
+       read_conf_files(false);
 
        if(ServerInfo.description != NULL)
                rb_strlcpy(me.info, ServerInfo.description, sizeof(me.info));
@@ -655,11 +654,11 @@ rehash(int sig)
                rb_strlcpy(me.info, "unknown", sizeof(me.info));
 
        open_logfiles();
-       return (0);
+       return false;
 }
 
 void
-rehash_bans(int sig)
+rehash_bans(void)
 {
        bandb_rehash_bans();
 }
@@ -1417,7 +1416,7 @@ read_conf_files(bool cold)
  * free an alias{} entry.
  */
 static void
-free_alias_cb(struct DictionaryElement *ptr, void *unused)
+free_alias_cb(rb_dictionary_element *ptr, void *unused)
 {
        struct alias_entry *aptr = ptr->data;