From 70ea02ebd6189d71223254d2638f7a3a3f3f56e8 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 8 Jan 2010 18:46:29 +0100 Subject: [PATCH] Complete the move of xlines and resvs from aconf->name to aconf->host. --- extensions/m_sendbans.c | 8 ++++---- modules/m_stats.c | 4 ++-- modules/m_testline.c | 6 +++--- src/client.c | 2 +- src/kdparse.c | 8 ++++---- src/s_newconf.c | 14 +++++++------- src/s_user.c | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/extensions/m_sendbans.c b/extensions/m_sendbans.c index 00ff7da8c..a623cf132 100644 --- a/extensions/m_sendbans.c +++ b/extensions/m_sendbans.c @@ -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, diff --git a/modules/m_stats.c b/modules/m_stats.c index 92b0e433c..dbc76994f 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -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 } diff --git a/modules/m_testline.c b/modules/m_testline.c index bee4fcc12..46985bb33 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -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; } diff --git a/src/client.c b/src/client.c index 47ba0a450..72ce398b5 100644 --- a/src/client.c +++ b/src/client.c @@ -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; } diff --git a/src/kdparse.c b/src/kdparse.c index 090c79333..b7614ce08 100644 --- a/src/kdparse.c +++ b/src/kdparse.c @@ -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); } diff --git a/src/s_newconf.c b/src/s_newconf.c index b26be9de6..592b410dd 100644 --- a/src/s_newconf.c +++ b/src/s_newconf.c @@ -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); } diff --git a/src/s_user.c b/src/s_user.c index 862e9c71a..7d7bc1b94 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -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; }