]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Complete the move of xlines and resvs from aconf->name to aconf->host.
authorJilles Tjoelker <redacted>
Fri, 8 Jan 2010 17:46:29 +0000 (18:46 +0100)
committerJilles Tjoelker <redacted>
Fri, 8 Jan 2010 17:46:29 +0000 (18:46 +0100)
extensions/m_sendbans.c
modules/m_stats.c
modules/m_testline.c
src/client.c
src/kdparse.c
src/s_newconf.c
src/s_user.c

index 00ff7da8c619242e56cc23266298e3b9929a77f2..a623cf132866b1b31716a4c59e62c594730789a9 100644 (file)
@@ -138,7 +138,7 @@ static int mo_sendbans(struct Client *client_p, struct Client *source_p, int par
                sendto_match_servs(source_p, target,
                                CAP_ENCAP, NOCAPS,
                                "ENCAP %s RESV 0 %s 0 :%s",
-                               target, aconf->name, aconf->passwd);
+                               target, aconf->host, aconf->passwd);
        }
 
        HASH_WALK(i, R_MAX, ptr, resvTable)
@@ -149,7 +149,7 @@ static int mo_sendbans(struct Client *client_p, struct Client *source_p, int par
                sendto_match_servs(source_p, target,
                                CAP_ENCAP, NOCAPS,
                                "ENCAP %s RESV 0 %s 0 :%s",
-                               target, aconf->name, aconf->passwd);
+                               target, aconf->host, aconf->passwd);
        }
        HASH_WALK_END
 
@@ -158,11 +158,11 @@ static int mo_sendbans(struct Client *client_p, struct Client *source_p, int par
                aconf = ptr->data;
                if (aconf->hold)
                        continue;
-               mask2 = expand_xline(aconf->name);
+               mask2 = expand_xline(aconf->host);
                if (mask2 == NULL)
                {
                        sendto_one_notice(source_p, ":Skipping xline [%s]",
-                                       aconf->name);
+                                       aconf->host);
                        continue;
                }
                sendto_match_servs(source_p, target,
index 92b0e433cc1317ebc7c184e799447690640cd338..dbc76994fec76b99bafaa88e33c04726f2d45deb 100644 (file)
@@ -744,7 +744,7 @@ stats_tresv(struct Client *source_p)
                if(aconf->hold)
                        sendto_one_numeric(source_p, RPL_STATSQLINE, 
                                        form_str(RPL_STATSQLINE),
-                                       'q', aconf->port, aconf->name, aconf->passwd);
+                                       'q', aconf->port, aconf->host, aconf->passwd);
        }
 
        HASH_WALK(i, R_MAX, ptr, resvTable)
@@ -753,7 +753,7 @@ stats_tresv(struct Client *source_p)
                if(aconf->hold)
                        sendto_one_numeric(source_p, RPL_STATSQLINE, 
                                        form_str(RPL_STATSQLINE),
-                                       'q', aconf->port, aconf->name, aconf->passwd);
+                                       'q', aconf->port, aconf->host, aconf->passwd);
        }
        HASH_WALK_END
 }
index bee4fcc12c305506a0754285205a8dfc4aadff09..46985bb33c5ed4aae7047077e65f22ed5d5d373f 100644 (file)
@@ -85,7 +85,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
                                        me.name, source_p->name,
                                        resv_p->hold ? 'q' : 'Q',
                                        resv_p->hold ? (long) ((resv_p->hold - rb_current_time()) / 60) : 0L,
-                                       resv_p->name, resv_p->passwd);
+                                       resv_p->host, resv_p->passwd);
                        /* this is a false positive, so make sure it isn't counted in stats q
                         * --nenolod
                         */
@@ -205,7 +205,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
                                me.name, source_p->name,
                                resv_p->hold ? 'q' : 'Q',
                                resv_p->hold ? (long) ((resv_p->hold - rb_current_time()) / 60) : 0L,
-                               resv_p->name, resv_p->passwd);
+                               resv_p->host, resv_p->passwd);
 
                /* this is a false positive, so make sure it isn't counted in stats q
                 * --nenolod
@@ -246,6 +246,6 @@ mo_testgecos(struct Client *client_p, struct Client *source_p, int parc, const c
                        me.name, source_p->name,
                        aconf->hold ? 'x' : 'X',
                        aconf->hold ? (long) ((aconf->hold - rb_current_time()) / 60) : 0L,
-                       aconf->name, aconf->passwd);
+                       aconf->host, aconf->passwd);
        return 0;
 }
index 47ba0a450c29fa143e0e542c1a69ca90e054baaf..72ce398b5162ab58a36a4d64ffac188af31acbe1 100644 (file)
@@ -585,7 +585,7 @@ check_xlines(void)
                                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                                     "XLINE over-ruled for %s, client is kline_exempt [%s]",
                                                     get_client_name(client_p, HIDE_IP),
-                                                    aconf->name);
+                                                    aconf->host);
                                continue;
                        }
 
index 090c79333eeeadc31ea0399422f30c8f2e1f92be..b7614ce08331107d7221249fafdc10d824e76246 100644 (file)
@@ -233,7 +233,7 @@ parse_x_file(FILE * file)
                aconf = make_conf();
                aconf->status = CONF_XLINE;
 
-               aconf->name = encoded;
+               aconf->host = encoded;
                aconf->passwd = rb_strdup(reason_field);
 
                rb_dlinkAddAlloc(aconf, &xline_conf_list);
@@ -274,9 +274,9 @@ parse_resv_file(FILE * file)
                        aconf->status = CONF_RESV_CHANNEL;
                        aconf->port = 0;
 
-                       aconf->name = rb_strdup(host_field);
+                       aconf->host = rb_strdup(host_field);
                        aconf->passwd = rb_strdup(reason_field);
-                       add_to_resv_hash(aconf->name, aconf);
+                       add_to_resv_hash(aconf->host, aconf);
                }
                else if(clean_resv_nick(host_field))
                {
@@ -287,7 +287,7 @@ parse_resv_file(FILE * file)
                        aconf->status = CONF_RESV_NICK;
                        aconf->port = 0;
 
-                       aconf->name = rb_strdup(host_field);
+                       aconf->host = rb_strdup(host_field);
                        aconf->passwd = rb_strdup(reason_field);
                        rb_dlinkAddAlloc(aconf, &resv_conf_list);
                }
index b26be9de6b677fd1c0358d0d086356c801380456..592b410ddf78d7465d8601022d2d11d53042c2bb 100644 (file)
@@ -486,7 +486,7 @@ find_xline(const char *gecos, int counter)
        {
                aconf = ptr->data;
 
-               if(match_esc(aconf->name, gecos))
+               if(match_esc(aconf->host, gecos))
                {
                        if(counter)
                                aconf->port++;
@@ -507,7 +507,7 @@ find_xline_mask(const char *gecos)
        {
                aconf = ptr->data;
 
-               if(!irccmp(aconf->name, gecos))
+               if(!irccmp(aconf->host, gecos))
                        return aconf;
        }
 
@@ -524,7 +524,7 @@ find_nick_resv(const char *name)
        {
                aconf = ptr->data;
 
-               if(match_esc(aconf->name, name))
+               if(match_esc(aconf->host, name))
                {
                        aconf->port++;
                        return aconf;
@@ -544,7 +544,7 @@ find_nick_resv_mask(const char *name)
        {
                aconf = ptr->data;
 
-               if(!irccmp(aconf->name, name))
+               if(!irccmp(aconf->host, name))
                        return aconf;
        }
 
@@ -668,7 +668,7 @@ expire_temp_rxlines(void *unused)
                        if(ConfigFileEntry.tkline_expire_notices)
                                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                                "Temporary RESV for [%s] expired",
-                                               aconf->name);
+                                               aconf->host);
 
                        free_conf(aconf);
                        rb_dlinkDestroy(ptr, &resvTable[i]);
@@ -685,7 +685,7 @@ expire_temp_rxlines(void *unused)
                        if(ConfigFileEntry.tkline_expire_notices)
                                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                                "Temporary RESV for [%s] expired",
-                                               aconf->name);
+                                               aconf->host);
                        free_conf(aconf);
                        rb_dlinkDestroy(ptr, &resv_conf_list);
                }
@@ -700,7 +700,7 @@ expire_temp_rxlines(void *unused)
                        if(ConfigFileEntry.tkline_expire_notices)
                                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                                "Temporary X-line for [%s] expired",
-                                               aconf->name);
+                                               aconf->host);
                        free_conf(aconf);
                        rb_dlinkDestroy(ptr, &xline_conf_list);
                }
index 862e9c71adefde9d5900031ecd36dc863135615b..7d7bc1b94cc8af544c7754d7ceef750f6a5ecd97 100644 (file)
@@ -420,7 +420,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
           (xconf = find_xline(source_p->info, 1)) != NULL)
        {
                ServerStats.is_ref++;
-               add_reject(source_p, xconf->name, NULL);
+               add_reject(source_p, xconf->host, NULL);
                exit_client(client_p, source_p, &me, "Bad user info");
                return CLIENT_EXITED;
        }