]> jfr.im git - solanum.git/blobdiff - modules/m_kline.c
ircd: get_channel_access(): do not derive channel pointer from membership
[solanum.git] / modules / m_kline.c
index e133b02638a34e5a3dc9d5b664258619b019add6..a47939d42eaaae51f15c0a2ce1f9c72835642191 100644 (file)
@@ -724,7 +724,7 @@ already_placed_kline(struct Client *source_p, const char *luser, const char *lho
        if(aconf == NULL && ConfigFileEntry.non_redundant_klines)
        {
                bits = 0;
-               if((t = parse_netmask(lhost, (struct sockaddr *) &iphost, &bits)) != HM_HOST)
+               if((t = parse_netmask(lhost, &iphost, &bits)) != HM_HOST)
                {
 #ifdef RB_IPV6
                        if(t == HM_IPV6)
@@ -834,6 +834,7 @@ static void
 remove_prop_kline(struct Client *source_p, struct ConfItem *aconf)
 {
        rb_dlink_node *ptr;
+       time_t now;
 
        ptr = rb_dlinkFind(aconf, &prop_bans);
        if (!ptr)
@@ -848,8 +849,9 @@ remove_prop_kline(struct Client *source_p, struct ConfItem *aconf)
 
        ilog(L_KLINE, "UK %s %s %s",
             get_oper_name(source_p), aconf->user, aconf->host);
-       if(aconf->created < rb_current_time())
-               aconf->created = rb_current_time();
+       now = rb_current_time();
+       if(aconf->created < now)
+               aconf->created = now;
        else
                aconf->created++;
        aconf->hold = aconf->created;
@@ -863,5 +865,5 @@ remove_prop_kline(struct Client *source_p, struct ConfItem *aconf)
                        0,
                        (int)(aconf->lifetime - aconf->created));
        remove_reject_mask(aconf->user, aconf->host);
-       deactivate_conf(aconf, ptr);
+       deactivate_conf(aconf, ptr, now);
 }