0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

Complete the move of xlines and resvs from aconf->name to aconf->host.

This commit is contained in:
Jilles Tjoelker 2010-01-08 18:46:29 +01:00
parent f67e7283f9
commit 70ea02ebd6
7 changed files with 22 additions and 22 deletions

View 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, sendto_match_servs(source_p, target,
CAP_ENCAP, NOCAPS, CAP_ENCAP, NOCAPS,
"ENCAP %s RESV 0 %s 0 :%s", "ENCAP %s RESV 0 %s 0 :%s",
target, aconf->name, aconf->passwd); target, aconf->host, aconf->passwd);
} }
HASH_WALK(i, R_MAX, ptr, resvTable) 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, sendto_match_servs(source_p, target,
CAP_ENCAP, NOCAPS, CAP_ENCAP, NOCAPS,
"ENCAP %s RESV 0 %s 0 :%s", "ENCAP %s RESV 0 %s 0 :%s",
target, aconf->name, aconf->passwd); target, aconf->host, aconf->passwd);
} }
HASH_WALK_END HASH_WALK_END
@ -158,11 +158,11 @@ static int mo_sendbans(struct Client *client_p, struct Client *source_p, int par
aconf = ptr->data; aconf = ptr->data;
if (aconf->hold) if (aconf->hold)
continue; continue;
mask2 = expand_xline(aconf->name); mask2 = expand_xline(aconf->host);
if (mask2 == NULL) if (mask2 == NULL)
{ {
sendto_one_notice(source_p, ":Skipping xline [%s]", sendto_one_notice(source_p, ":Skipping xline [%s]",
aconf->name); aconf->host);
continue; continue;
} }
sendto_match_servs(source_p, target, sendto_match_servs(source_p, target,

View file

@ -744,7 +744,7 @@ stats_tresv(struct Client *source_p)
if(aconf->hold) if(aconf->hold)
sendto_one_numeric(source_p, RPL_STATSQLINE, sendto_one_numeric(source_p, RPL_STATSQLINE,
form_str(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) HASH_WALK(i, R_MAX, ptr, resvTable)
@ -753,7 +753,7 @@ stats_tresv(struct Client *source_p)
if(aconf->hold) if(aconf->hold)
sendto_one_numeric(source_p, RPL_STATSQLINE, sendto_one_numeric(source_p, RPL_STATSQLINE,
form_str(RPL_STATSQLINE), form_str(RPL_STATSQLINE),
'q', aconf->port, aconf->name, aconf->passwd); 'q', aconf->port, aconf->host, aconf->passwd);
} }
HASH_WALK_END HASH_WALK_END
} }

View file

@ -85,7 +85,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
me.name, source_p->name, me.name, source_p->name,
resv_p->hold ? 'q' : 'Q', resv_p->hold ? 'q' : 'Q',
resv_p->hold ? (long) ((resv_p->hold - rb_current_time()) / 60) : 0L, 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 /* this is a false positive, so make sure it isn't counted in stats q
* --nenolod * --nenolod
*/ */
@ -205,7 +205,7 @@ mo_testline(struct Client *client_p, struct Client *source_p, int parc, const ch
me.name, source_p->name, me.name, source_p->name,
resv_p->hold ? 'q' : 'Q', resv_p->hold ? 'q' : 'Q',
resv_p->hold ? (long) ((resv_p->hold - rb_current_time()) / 60) : 0L, 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 /* this is a false positive, so make sure it isn't counted in stats q
* --nenolod * --nenolod
@ -246,6 +246,6 @@ mo_testgecos(struct Client *client_p, struct Client *source_p, int parc, const c
me.name, source_p->name, me.name, source_p->name,
aconf->hold ? 'x' : 'X', aconf->hold ? 'x' : 'X',
aconf->hold ? (long) ((aconf->hold - rb_current_time()) / 60) : 0L, aconf->hold ? (long) ((aconf->hold - rb_current_time()) / 60) : 0L,
aconf->name, aconf->passwd); aconf->host, aconf->passwd);
return 0; return 0;
} }

View file

@ -585,7 +585,7 @@ check_xlines(void)
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"XLINE over-ruled for %s, client is kline_exempt [%s]", "XLINE over-ruled for %s, client is kline_exempt [%s]",
get_client_name(client_p, HIDE_IP), get_client_name(client_p, HIDE_IP),
aconf->name); aconf->host);
continue; continue;
} }

View file

@ -233,7 +233,7 @@ parse_x_file(FILE * file)
aconf = make_conf(); aconf = make_conf();
aconf->status = CONF_XLINE; aconf->status = CONF_XLINE;
aconf->name = encoded; aconf->host = encoded;
aconf->passwd = rb_strdup(reason_field); aconf->passwd = rb_strdup(reason_field);
rb_dlinkAddAlloc(aconf, &xline_conf_list); rb_dlinkAddAlloc(aconf, &xline_conf_list);
@ -274,9 +274,9 @@ parse_resv_file(FILE * file)
aconf->status = CONF_RESV_CHANNEL; aconf->status = CONF_RESV_CHANNEL;
aconf->port = 0; aconf->port = 0;
aconf->name = rb_strdup(host_field); aconf->host = rb_strdup(host_field);
aconf->passwd = rb_strdup(reason_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)) else if(clean_resv_nick(host_field))
{ {
@ -287,7 +287,7 @@ parse_resv_file(FILE * file)
aconf->status = CONF_RESV_NICK; aconf->status = CONF_RESV_NICK;
aconf->port = 0; aconf->port = 0;
aconf->name = rb_strdup(host_field); aconf->host = rb_strdup(host_field);
aconf->passwd = rb_strdup(reason_field); aconf->passwd = rb_strdup(reason_field);
rb_dlinkAddAlloc(aconf, &resv_conf_list); rb_dlinkAddAlloc(aconf, &resv_conf_list);
} }

View file

@ -486,7 +486,7 @@ find_xline(const char *gecos, int counter)
{ {
aconf = ptr->data; aconf = ptr->data;
if(match_esc(aconf->name, gecos)) if(match_esc(aconf->host, gecos))
{ {
if(counter) if(counter)
aconf->port++; aconf->port++;
@ -507,7 +507,7 @@ find_xline_mask(const char *gecos)
{ {
aconf = ptr->data; aconf = ptr->data;
if(!irccmp(aconf->name, gecos)) if(!irccmp(aconf->host, gecos))
return aconf; return aconf;
} }
@ -524,7 +524,7 @@ find_nick_resv(const char *name)
{ {
aconf = ptr->data; aconf = ptr->data;
if(match_esc(aconf->name, name)) if(match_esc(aconf->host, name))
{ {
aconf->port++; aconf->port++;
return aconf; return aconf;
@ -544,7 +544,7 @@ find_nick_resv_mask(const char *name)
{ {
aconf = ptr->data; aconf = ptr->data;
if(!irccmp(aconf->name, name)) if(!irccmp(aconf->host, name))
return aconf; return aconf;
} }
@ -668,7 +668,7 @@ expire_temp_rxlines(void *unused)
if(ConfigFileEntry.tkline_expire_notices) if(ConfigFileEntry.tkline_expire_notices)
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Temporary RESV for [%s] expired", "Temporary RESV for [%s] expired",
aconf->name); aconf->host);
free_conf(aconf); free_conf(aconf);
rb_dlinkDestroy(ptr, &resvTable[i]); rb_dlinkDestroy(ptr, &resvTable[i]);
@ -685,7 +685,7 @@ expire_temp_rxlines(void *unused)
if(ConfigFileEntry.tkline_expire_notices) if(ConfigFileEntry.tkline_expire_notices)
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Temporary RESV for [%s] expired", "Temporary RESV for [%s] expired",
aconf->name); aconf->host);
free_conf(aconf); free_conf(aconf);
rb_dlinkDestroy(ptr, &resv_conf_list); rb_dlinkDestroy(ptr, &resv_conf_list);
} }
@ -700,7 +700,7 @@ expire_temp_rxlines(void *unused)
if(ConfigFileEntry.tkline_expire_notices) if(ConfigFileEntry.tkline_expire_notices)
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Temporary X-line for [%s] expired", "Temporary X-line for [%s] expired",
aconf->name); aconf->host);
free_conf(aconf); free_conf(aconf);
rb_dlinkDestroy(ptr, &xline_conf_list); rb_dlinkDestroy(ptr, &xline_conf_list);
} }

View 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) (xconf = find_xline(source_p->info, 1)) != NULL)
{ {
ServerStats.is_ref++; 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"); exit_client(client_p, source_p, &me, "Bad user info");
return CLIENT_EXITED; return CLIENT_EXITED;
} }