]> jfr.im git - solanum.git/blobdiff - ircd/channel.c
ircd startup: avoid black magic with file descriptors
[solanum.git] / ircd / channel.c
index 07501bd311275f2e5238c0010c5521d665bf7e8e..8f0b094e43e72134bb0e7ff5ed6d5eb243f02425 100644 (file)
@@ -38,7 +38,6 @@
 #include "s_conf.h"            /* ConfigFileEntry, ConfigChannel */
 #include "s_newconf.h"
 #include "logger.h"
-#include "ipv4_from_ipv6.h"
 #include "s_assert.h"
 
 struct config_channel_entry ConfigChannel;
@@ -336,7 +335,7 @@ invalidate_bancache_user(struct Client *client_p)
 /* check_channel_name()
  *
  * input       - channel name
- * output      - true if valid channel name, else 0
+ * output      - true if valid channel name, else false
  * side effects -
  */
 bool
@@ -581,7 +580,7 @@ is_banned_list(struct Channel *chptr, rb_dlink_list *list,
        }
 #ifdef RB_IPV6
        if(GET_SS_FAMILY(&who->localClient->ip) == AF_INET6 &&
-                       ipv4_from_ipv6((const struct sockaddr_in6 *)&who->localClient->ip, &ip4))
+                       rb_ipv4_from_ipv6((const struct sockaddr_in6 *)&who->localClient->ip, &ip4))
        {
                sprintf(src_ip4host, "%s!%s@", who->name, who->username);
                s4 = src_ip4host + strlen(src_ip4host);
@@ -901,11 +900,11 @@ can_send(struct Channel *chptr, struct Client *source_p, struct membership *mspt
  * inputs       - flag 0 if PRIVMSG 1 if NOTICE. RFC
  *                says NOTICE must not auto reply
  *              - pointer to source Client
- *             - pointer to target channel
- * output      - 1 if target is under flood attack
+ *              - pointer to target channel
+ * output       - true if target is under flood attack
  * side effects        - check for flood attack on target chptr
  */
-int
+bool
 flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr, char *chname)
 {
        int delta;
@@ -943,13 +942,13 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
                                sendto_one(source_p,
                                           ":%s NOTICE %s :*** Message to %s throttled due to flooding",
                                           me.name, source_p->name, chptr->chname);
-                       return 1;
+                       return true;
                }
                else
                        chptr->received_number_of_privmsgs++;
        }
 
-       return 0;
+       return false;
 }
 
 /* find_bannickchange_channel()
@@ -1260,7 +1259,7 @@ send_cap_mode_changes(struct Client *client_p, struct Client *source_p,
        char *pbuf;
        const char *arg;
        int dir;
-       int arglen;
+       int arglen = 0;
 
        /* Now send to servers... */
        mc = 0;