Get rid of User.server.

This commit is contained in:
William Pitcock 2007-11-20 06:36:55 -06:00
parent 0a61720ad4
commit c88cdb0095
26 changed files with 66 additions and 70 deletions

View File

@ -59,6 +59,6 @@ show_whois(hook_data_client *data)
":*** Notice -- %s (%s@%s) is doing a whois on you [%s]", ":*** Notice -- %s (%s@%s) is doing a whois on you [%s]",
source_p->name, source_p->name,
source_p->username, source_p->host, source_p->username, source_p->host,
source_p->user->server); source_p->servptr->name);
} }
} }

View File

@ -43,5 +43,5 @@ show_admin(hook_data *data)
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"admin requested by %s (%s@%s) [%s]", "admin requested by %s (%s@%s) [%s]",
data->client->name, data->client->username, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }

View File

@ -43,5 +43,5 @@ show_info(hook_data *data)
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"info requested by %s (%s@%s) [%s]", "info requested by %s (%s@%s) [%s]",
data->client->name, data->client->username, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }

View File

@ -45,5 +45,5 @@ show_links(hook_data *data)
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"LINKS '%s' requested by %s (%s@%s) [%s]", "LINKS '%s' requested by %s (%s@%s) [%s]",
mask, data->client->name, data->client->username, mask, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }

View File

@ -43,5 +43,5 @@ show_motd(hook_data *data)
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"motd requested by %s (%s@%s) [%s]", "motd requested by %s (%s@%s) [%s]",
data->client->name, data->client->username, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }

View File

@ -52,19 +52,19 @@ show_stats(hook_data_int *data)
statchar, data->client->name, statchar, data->client->name,
data->client->username, data->client->username,
data->client->host, data->client->host,
data->client->user->server, name); data->client->servptr->name, name);
else else
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s]", "STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name, statchar, data->client->name,
data->client->username, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }
else else
{ {
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS %c requested by %s (%s@%s) [%s]", "STATS %c requested by %s (%s@%s) [%s]",
statchar, data->client->name, data->client->username, statchar, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }
} }

View File

@ -43,5 +43,5 @@ show_stats_p(hook_data *data)
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"STATS p requested by %s (%s@%s) [%s]", "STATS p requested by %s (%s@%s) [%s]",
data->client->name, data->client->username, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }

View File

@ -44,11 +44,11 @@ show_trace(hook_data_client *data)
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"trace requested by %s (%s@%s) [%s] on %s", "trace requested by %s (%s@%s) [%s] on %s",
data->client->name, data->client->username, data->client->name, data->client->username,
data->client->host, data->client->user->server, data->client->host, data->client->servptr->name,
data->target->name); data->target->name);
else else
sendto_realops_snomask(SNO_SPY, L_ALL, sendto_realops_snomask(SNO_SPY, L_ALL,
"trace requested by %s (%s@%s) [%s]", "trace requested by %s (%s@%s) [%s]",
data->client->name, data->client->username, data->client->name, data->client->username,
data->client->host, data->client->user->server); data->client->host, data->client->servptr->name);
} }

View File

@ -95,7 +95,6 @@ struct User
dlink_list invited; /* chain of invite pointer blocks */ dlink_list invited; /* chain of invite pointer blocks */
char *away; /* pointer to away message */ char *away; /* pointer to away message */
int refcnt; /* Number of times this block is referenced */ int refcnt; /* Number of times this block is referenced */
const char *server; /* pointer to scached server name */
char suser[NICKLEN+1]; char suser[NICKLEN+1];
}; };

View File

@ -511,7 +511,7 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char *
source_p->id, (long) chptr->channelts, chptr->chname); source_p->id, (long) chptr->channelts, chptr->chname);
sendto_server(client_p, chptr, NOCAPS, CAP_TS6, sendto_server(client_p, chptr, NOCAPS, CAP_TS6,
":%s SJOIN %ld %s %s :%s", ":%s SJOIN %ld %s %s :%s",
source_p->user->server, (long) chptr->channelts, source_p->servptr->name, (long) chptr->channelts,
chptr->chname, keep_new_modes ? "+" : "0", chptr->chname, keep_new_modes ? "+" : "0",
source_p->name); source_p->name);
return 0; return 0;

View File

@ -131,7 +131,7 @@ mo_kill(struct Client *client_p, struct Client *source_p, int parc, const char *
ilog(L_KILL, "%c %s %s!%s@%s %s %s", ilog(L_KILL, "%c %s %s!%s@%s %s %s",
MyConnect(target_p) ? 'L' : 'G', get_oper_name(source_p), MyConnect(target_p) ? 'L' : 'G', get_oper_name(source_p),
target_p->name, target_p->username, target_p->host, target_p->user->server, reason); target_p->name, target_p->username, target_p->host, target_p->servptr->name, reason);
/* /*
** And pass on the message to other servers. Note, that if KILL ** And pass on the message to other servers. Note, that if KILL
@ -247,13 +247,13 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char *
sendto_realops_snomask(IsService(source_p) ? SNO_SKILL : SNO_GENERAL, L_ALL, sendto_realops_snomask(IsService(source_p) ? SNO_SKILL : SNO_GENERAL, L_ALL,
"Received KILL message for %s!%s@%s. From %s Path: %s!%s!%s!%s %s", "Received KILL message for %s!%s@%s. From %s Path: %s!%s!%s!%s %s",
target_p->name, target_p->username, target_p->orighost, parv[0], target_p->name, target_p->username, target_p->orighost, parv[0],
source_p->user->server, source_p->host, source_p->username, source_p->servptr->name, source_p->host, source_p->username,
source_p->name, reason); source_p->name, reason);
ilog(L_KILL, "%c %s %s!%s@%s %s %s", ilog(L_KILL, "%c %s %s!%s@%s %s %s",
MyConnect(target_p) ? 'O' : 'R', get_oper_name(source_p), MyConnect(target_p) ? 'O' : 'R', get_oper_name(source_p),
target_p->name, target_p->username, target_p->host, target_p->name, target_p->username, target_p->host,
target_p->user->server, reason); target_p->servptr->name, reason);
} }
else else
{ {
@ -264,7 +264,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char *
ilog(L_KILL, "S %s %s!%s@%s %s %s", ilog(L_KILL, "S %s %s!%s@%s %s %s",
source_p->name, target_p->name, target_p->username, source_p->name, target_p->name, target_p->username,
target_p->host, target_p->user->server, reason); target_p->host, target_p->servptr->name, reason);
} }
relay_kill(client_p, source_p, target_p, path, reason); relay_kill(client_p, source_p, target_p, path, reason);

View File

@ -785,7 +785,7 @@ flood_attack_client(int p_or_n, struct Client *source_p, struct Client *target_p
"Possible Flooder %s[%s@%s] on %s target: %s", "Possible Flooder %s[%s@%s] on %s target: %s",
source_p->name, source_p->username, source_p->name, source_p->username,
source_p->orighost, source_p->orighost,
source_p->user->server, target_p->name); source_p->servptr->name, target_p->name);
target_p->localClient->flood_noticed = 1; target_p->localClient->flood_noticed = 1;
/* add a bit of penalty */ /* add a bit of penalty */
target_p->localClient->received_number_of_privmsgs += 2; target_p->localClient->received_number_of_privmsgs += 2;
@ -840,7 +840,7 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
"Possible Flooder %s[%s@%s] on %s target: %s", "Possible Flooder %s[%s@%s] on %s target: %s",
source_p->name, source_p->username, source_p->name, source_p->username,
source_p->orighost, source_p->orighost,
source_p->user->server, chptr->chname); source_p->servptr->name, chptr->chname);
chptr->flood_noticed = 1; chptr->flood_noticed = 1;
/* Add a bit of penalty */ /* Add a bit of penalty */

View File

@ -284,7 +284,7 @@ mc_nick(struct Client *client_p, struct Client *source_p, int parc, const char *
ServerStats->is_kill++; ServerStats->is_kill++;
sendto_realops_snomask(SNO_DEBUG, L_ALL, sendto_realops_snomask(SNO_DEBUG, L_ALL,
"Bad Nick: %s From: %s(via %s)", "Bad Nick: %s From: %s(via %s)",
parv[1], source_p->user->server, client_p->name); parv[1], source_p->servptr->name, client_p->name);
sendto_one(client_p, ":%s KILL %s :%s (Bad Nickname)", me.name, parv[1], me.name); sendto_one(client_p, ":%s KILL %s :%s (Bad Nickname)", me.name, parv[1], me.name);
/* bad nick change, issue kill for the old nick to the rest /* bad nick change, issue kill for the old nick to the rest
@ -1186,7 +1186,6 @@ register_client(struct Client *client_p, struct Client *server,
if(parc == 12) if(parc == 12)
{ {
user->server = find_or_add(server->name);
strlcpy(source_p->info, parv[11], sizeof(source_p->info)); strlcpy(source_p->info, parv[11], sizeof(source_p->info));
strlcpy(source_p->sockhost, parv[7], sizeof(source_p->sockhost)); strlcpy(source_p->sockhost, parv[7], sizeof(source_p->sockhost));
strlcpy(source_p->id, parv[8], sizeof(source_p->id)); strlcpy(source_p->id, parv[8], sizeof(source_p->id));
@ -1202,7 +1201,6 @@ register_client(struct Client *client_p, struct Client *server,
} }
else if(parc == 10) else if(parc == 10)
{ {
user->server = find_or_add(server->name);
strlcpy(source_p->info, parv[9], sizeof(source_p->info)); strlcpy(source_p->info, parv[9], sizeof(source_p->info));
strlcpy(source_p->sockhost, parv[7], sizeof(source_p->sockhost)); strlcpy(source_p->sockhost, parv[7], sizeof(source_p->sockhost));
strlcpy(source_p->id, parv[8], sizeof(source_p->id)); strlcpy(source_p->id, parv[8], sizeof(source_p->id));
@ -1210,7 +1208,6 @@ register_client(struct Client *client_p, struct Client *server,
} }
else else
{ {
user->server = find_or_add(parv[7]);
strlcpy(source_p->info, parv[8], sizeof(source_p->info)); strlcpy(source_p->info, parv[8], sizeof(source_p->info));
} }
@ -1234,7 +1231,7 @@ register_client(struct Client *client_p, struct Client *server,
DLINK_FOREACH(ptr, service_list.head) DLINK_FOREACH(ptr, service_list.head)
{ {
if(!irccmp((const char *) ptr->data, user->server)) if(!irccmp((const char *) ptr->data, server->name))
{ {
hit++; hit++;
break; break;
@ -1270,11 +1267,11 @@ register_client(struct Client *client_p, struct Client *server,
if(server == NULL) if(server == NULL)
{ {
if((source_p->servptr = find_server(NULL, user->server)) == NULL) if((source_p->servptr = find_server(NULL, server->name)) == NULL)
{ {
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Ghost killed: %s on invalid server %s", "Ghost killed: %s on invalid server %s",
source_p->name, user->server); source_p->name, server->name);
kill_client(client_p, source_p, "%s (Server doesn't exist)", me.name); kill_client(client_p, source_p, "%s (Server doesn't exist)", me.name);
source_p->flags |= FLAGS_KILLED; source_p->flags |= FLAGS_KILLED;
return exit_client(NULL, source_p, &me, "Ghosted Client"); return exit_client(NULL, source_p, &me, "Ghosted Client");
@ -1294,10 +1291,10 @@ register_client(struct Client *client_p, struct Client *server,
"Bad User [%s] :%s USER %s@%s %s, != %s[%s]", "Bad User [%s] :%s USER %s@%s %s, != %s[%s]",
client_p->name, source_p->name, client_p->name, source_p->name,
source_p->username, source_p->host, source_p->username, source_p->host,
user->server, target_p->name, target_p->from->name); server->name, target_p->name, target_p->from->name);
kill_client(client_p, source_p, kill_client(client_p, source_p,
"%s (NICK from wrong direction (%s != %s))", "%s (NICK from wrong direction (%s != %s))",
me.name, user->server, target_p->from->name); me.name, server->name, target_p->from->name);
source_p->flags |= FLAGS_KILLED; source_p->flags |= FLAGS_KILLED;
return exit_client(source_p, source_p, &me, "USER server wrong direction"); return exit_client(source_p, source_p, &me, "USER server wrong direction");
} }

View File

@ -107,7 +107,7 @@ mo_etrace(struct Client *client_p, struct Client *source_p, int parc, const char
if(!MyClient(target_p)) if(!MyClient(target_p))
sendto_one(target_p, ":%s ENCAP %s ETRACE %s", sendto_one(target_p, ":%s ENCAP %s ETRACE %s",
get_id(source_p, target_p), get_id(source_p, target_p),
target_p->user->server, target_p->servptr->name,
get_id(target_p, target_p)); get_id(target_p, target_p));
else else
do_single_etrace(source_p, target_p); do_single_etrace(source_p, target_p);

View File

@ -178,7 +178,7 @@ mo_gline(struct Client *client_p, struct Client *source_p, int parc, const char
source_p->host, me.name, user, host, reason); source_p->host, me.name, user, host, reason);
ilog(L_GLINE, "R %s %s %s %s %s %s %s", ilog(L_GLINE, "R %s %s %s %s %s %s %s",
source_p->name, source_p->username, source_p->host, source_p->name, source_p->username, source_p->host,
source_p->user->server, user, host, reason); source_p->servptr->name, user, host, reason);
/* If at least 3 opers agree this user should be G lined then do it */ /* If at least 3 opers agree this user should be G lined then do it */
majority_gline(source_p, user, host, reason); majority_gline(source_p, user, host, reason);
@ -195,7 +195,7 @@ mo_gline(struct Client *client_p, struct Client *source_p, int parc, const char
sendto_server(NULL, NULL, NOCAPS, CAP_GLN, sendto_server(NULL, NULL, NOCAPS, CAP_GLN,
":%s GLINE %s %s %s %s %s %s :%s", ":%s GLINE %s %s %s %s %s %s :%s",
me.name, source_p->name, source_p->username, me.name, source_p->name, source_p->username,
source_p->host, source_p->user->server, source_p->host, source_p->servptr->name,
user, host, reason); user, host, reason);
return 0; return 0;
} }
@ -233,9 +233,9 @@ mc_gline(struct Client *client_p, struct Client *source_p,
acptr->name, user, host, reason); acptr->name, user, host, reason);
sendto_server(client_p, NULL, NOCAPS, CAP_GLN, sendto_server(client_p, NULL, NOCAPS, CAP_GLN,
":%s GLINE %s %s %s %s %s %s :%s", ":%s GLINE %s %s %s %s %s %s :%s",
acptr->user->server, acptr->name, acptr->servptr->name, acptr->name,
acptr->username, acptr->host, acptr->username, acptr->host,
acptr->user->server, user, host, reason); acptr->servptr->name, user, host, reason);
if(!ConfigFileEntry.glines) if(!ConfigFileEntry.glines)
return 0; return 0;
@ -247,7 +247,7 @@ mc_gline(struct Client *client_p, struct Client *source_p,
"%s!%s@%s on %s is requesting a gline without " "%s!%s@%s on %s is requesting a gline without "
"%d non-wildcard characters for [%s@%s] [%s]", "%d non-wildcard characters for [%s@%s] [%s]",
acptr->name, acptr->username, acptr->name, acptr->username,
acptr->host, acptr->user->server, acptr->host, acptr->servptr->name,
ConfigFileEntry.min_nonwildcard, ConfigFileEntry.min_nonwildcard,
user, host, reason); user, host, reason);
return 0; return 0;
@ -266,7 +266,7 @@ mc_gline(struct Client *client_p, struct Client *source_p,
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s!%s@%s on %s is requesting a " sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s!%s@%s on %s is requesting a "
"gline with a cidr mask < %d for [%s@%s] [%s]", "gline with a cidr mask < %d for [%s@%s] [%s]",
acptr->name, acptr->username, acptr->host, acptr->name, acptr->username, acptr->host,
acptr->user->server, acptr->servptr->name,
ConfigFileEntry.gline_min_cidr, ConfigFileEntry.gline_min_cidr,
user, host, reason); user, host, reason);
return 0; return 0;
@ -278,7 +278,7 @@ mc_gline(struct Client *client_p, struct Client *source_p,
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s!%s@%s on %s is requesting a " sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s!%s@%s on %s is requesting a "
"gline with a cidr mask < %d for [%s@%s] [%s]", "gline with a cidr mask < %d for [%s@%s] [%s]",
acptr->name, acptr->username, acptr->host, acptr->name, acptr->username, acptr->host,
acptr->user->server, acptr->servptr->name,
ConfigFileEntry.gline_min_cidr6, ConfigFileEntry.gline_min_cidr6,
user, host, reason); user, host, reason);
return 0; return 0;
@ -289,11 +289,11 @@ mc_gline(struct Client *client_p, struct Client *source_p,
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s!%s@%s on %s is requesting gline for [%s@%s] [%s]", "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
acptr->name, acptr->username, acptr->host, acptr->name, acptr->username, acptr->host,
acptr->user->server, user, host, reason); acptr->servptr->name, user, host, reason);
ilog(L_GLINE, "R %s %s %s %s %s %s %s", ilog(L_GLINE, "R %s %s %s %s %s %s %s",
source_p->name, source_p->username, source_p->host, source_p->name, source_p->username, source_p->host,
source_p->user->server, user, host, reason); source_p->servptr->name, user, host, reason);
/* If at least 3 opers agree this user should be G lined then do it */ /* If at least 3 opers agree this user should be G lined then do it */
majority_gline(acptr, user, host, reason); majority_gline(acptr, user, host, reason);
@ -345,9 +345,9 @@ ms_gline(struct Client *client_p, struct Client *source_p, int parc, const char
acptr->name, user, host, reason); acptr->name, user, host, reason);
sendto_server(client_p, NULL, NOCAPS, CAP_GLN, sendto_server(client_p, NULL, NOCAPS, CAP_GLN,
":%s GLINE %s %s %s %s %s %s :%s", ":%s GLINE %s %s %s %s %s %s :%s",
acptr->user->server, acptr->name, acptr->servptr->name, acptr->name,
acptr->username, acptr->host, acptr->username, acptr->host,
acptr->user->server, user, host, reason); acptr->servptr->name, user, host, reason);
if(!ConfigFileEntry.glines) if(!ConfigFileEntry.glines)
return 0; return 0;
@ -359,7 +359,7 @@ ms_gline(struct Client *client_p, struct Client *source_p, int parc, const char
"%s!%s@%s on %s is requesting a gline without " "%s!%s@%s on %s is requesting a gline without "
"%d non-wildcard characters for [%s@%s] [%s]", "%d non-wildcard characters for [%s@%s] [%s]",
acptr->name, acptr->username, acptr->name, acptr->username,
acptr->host, acptr->user->server, acptr->host, acptr->servptr->name,
ConfigFileEntry.min_nonwildcard, ConfigFileEntry.min_nonwildcard,
user, host, reason); user, host, reason);
return 0; return 0;
@ -368,11 +368,11 @@ ms_gline(struct Client *client_p, struct Client *source_p, int parc, const char
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s!%s@%s on %s is requesting gline for [%s@%s] [%s]", "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
acptr->name, acptr->username, acptr->host, acptr->name, acptr->username, acptr->host,
acptr->user->server, user, host, reason); acptr->servptr->name, user, host, reason);
ilog(L_GLINE, "R %s %s %s %s %s %s %s", ilog(L_GLINE, "R %s %s %s %s %s %s %s",
acptr->name, acptr->username, acptr->host, acptr->name, acptr->username, acptr->host,
acptr->user->server, user, host, reason); acptr->servptr->name, user, host, reason);
/* If at least 3 opers agree this user should be G lined then do it */ /* If at least 3 opers agree this user should be G lined then do it */
majority_gline(acptr, user, host, reason); majority_gline(acptr, user, host, reason);
@ -443,7 +443,7 @@ mo_ungline(struct Client *client_p, struct Client *source_p, int parc, const cha
get_oper_name(source_p), user, host); get_oper_name(source_p), user, host);
ilog(L_GLINE, "U %s %s %s %s %s %s", ilog(L_GLINE, "U %s %s %s %s %s %s",
source_p->name, source_p->username, source_p->host, source_p->name, source_p->username, source_p->host,
source_p->user->server, user, host); source_p->servptr->name, user, host);
} }
else else
{ {
@ -569,11 +569,11 @@ set_local_gline(struct Client *source_p, const char *user,
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s!%s@%s on %s has triggered gline for [%s@%s] [%s]", "%s!%s@%s on %s has triggered gline for [%s@%s] [%s]",
source_p->name, source_p->username, source_p->name, source_p->username,
source_p->host, source_p->user->server, source_p->host, source_p->servptr->name,
user, host, reason); user, host, reason);
ilog(L_GLINE, "T %s %s %s %s %s %s %s", ilog(L_GLINE, "T %s %s %s %s %s %s %s",
source_p->name, source_p->username, source_p->host, source_p->name, source_p->username, source_p->host,
source_p->user->server, user, host, reason); source_p->servptr->name, user, host, reason);
check_glines(); check_glines();
} }
@ -612,7 +612,7 @@ majority_gline(struct Client *source_p, const char *user,
sendto_realops_snomask(SNO_GENERAL, L_ALL, "oper has already voted"); sendto_realops_snomask(SNO_GENERAL, L_ALL, "oper has already voted");
return NO; return NO;
} }
else if(irccmp(pending->oper_server1, source_p->user->server) == 0) else if(irccmp(pending->oper_server1, source_p->servptr->name) == 0)
{ {
sendto_realops_snomask(SNO_GENERAL, L_ALL, "server has already voted"); sendto_realops_snomask(SNO_GENERAL, L_ALL, "server has already voted");
return NO; return NO;
@ -628,7 +628,7 @@ majority_gline(struct Client *source_p, const char *user,
"oper has already voted"); "oper has already voted");
return NO; return NO;
} }
else if(irccmp(pending->oper_server2, source_p->user->server) == 0) else if(irccmp(pending->oper_server2, source_p->servptr->name) == 0)
{ {
sendto_realops_snomask(SNO_GENERAL, L_ALL, sendto_realops_snomask(SNO_GENERAL, L_ALL,
"server has already voted"); "server has already voted");
@ -651,7 +651,7 @@ majority_gline(struct Client *source_p, const char *user,
strlcpy(pending->oper_host2, source_p->host, strlcpy(pending->oper_host2, source_p->host,
sizeof(pending->oper_host2)); sizeof(pending->oper_host2));
DupString(pending->reason2, reason); DupString(pending->reason2, reason);
pending->oper_server2 = find_or_add(source_p->user->server); pending->oper_server2 = find_or_add(source_p->servptr->name);
pending->last_gline_time = CurrentTime; pending->last_gline_time = CurrentTime;
pending->time_request2 = CurrentTime; pending->time_request2 = CurrentTime;
return NO; return NO;
@ -670,7 +670,7 @@ majority_gline(struct Client *source_p, const char *user,
strlcpy(pending->oper_host1, source_p->host, strlcpy(pending->oper_host1, source_p->host,
sizeof(pending->oper_host1)); sizeof(pending->oper_host1));
pending->oper_server1 = find_or_add(source_p->user->server); pending->oper_server1 = find_or_add(source_p->servptr->name);
strlcpy(pending->user, user, sizeof(pending->user)); strlcpy(pending->user, user, sizeof(pending->user));
strlcpy(pending->host, host, sizeof(pending->host)); strlcpy(pending->host, host, sizeof(pending->host));

View File

@ -280,7 +280,7 @@ handle_remote_kline(struct Client *source_p, int tkline_time,
char *oper_reason; char *oper_reason;
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->user->server, source_p->servptr->name,
(tkline_time > 0) ? SHARED_TKLINE : SHARED_PKLINE)) (tkline_time > 0) ? SHARED_TKLINE : SHARED_PKLINE))
return; return;
@ -466,7 +466,7 @@ static void
handle_remote_unkline(struct Client *source_p, const char *user, const char *host) handle_remote_unkline(struct Client *source_p, const char *user, const char *host)
{ {
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->user->server, SHARED_UNKLINE)) source_p->servptr->name, SHARED_UNKLINE))
return; return;
if(remove_temp_kline(user, host)) if(remove_temp_kline(user, host))

View File

@ -81,7 +81,7 @@ ms_locops(struct Client *client_p, struct Client *source_p, int parc, const char
if(!match(parv[1], me.name)) if(!match(parv[1], me.name))
return 0; return 0;
if(find_shared_conf("*", "*", source_p->user->server, SHARED_LOCOPS)) if(find_shared_conf("*", "*", source_p->servptr->name, SHARED_LOCOPS))
sendto_wallops_flags(UMODE_LOCOPS, source_p, "SLOCOPS - %s", parv[2]); sendto_wallops_flags(UMODE_LOCOPS, source_p, "SLOCOPS - %s", parv[2]);
return 0; return 0;
@ -94,7 +94,7 @@ me_locops(struct Client *client_p, struct Client *source_p,
if(!IsPerson(source_p)) if(!IsPerson(source_p))
return 0; return 0;
if(find_shared_conf("*", "*", source_p->user->server, SHARED_LOCOPS)) if(find_shared_conf("*", "*", source_p->servptr->name, SHARED_LOCOPS))
sendto_wallops_flags(UMODE_LOCOPS, source_p, "SLOCOPS - %s", parv[1]); sendto_wallops_flags(UMODE_LOCOPS, source_p, "SLOCOPS - %s", parv[1]);
return 0; return 0;

View File

@ -402,7 +402,7 @@ me_rehash(struct Client *client_p, struct Client *source_p, int parc, const char
return 0; return 0;
if (!find_shared_conf(source_p->username, source_p->host, if (!find_shared_conf(source_p->username, source_p->host,
source_p->user->server, SHARED_REHASH)) source_p->servptr->name, SHARED_REHASH))
return 0; return 0;
do_rehash(source_p, parc > 1 ? parv[1] : NULL); do_rehash(source_p, parc > 1 ? parv[1] : NULL);

View File

@ -186,7 +186,7 @@ parse_resv(struct Client *source_p, const char *name,
if(!MyClient(source_p) && if(!MyClient(source_p) &&
!find_shared_conf(source_p->username, source_p->host, !find_shared_conf(source_p->username, source_p->host,
source_p->user->server, source_p->servptr->name,
(temp_time > 0) ? SHARED_TRESV : SHARED_PRESV)) (temp_time > 0) ? SHARED_TRESV : SHARED_PRESV))
return; return;
@ -435,7 +435,7 @@ static void
handle_remote_unresv(struct Client *source_p, const char *name) handle_remote_unresv(struct Client *source_p, const char *name)
{ {
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->user->server, SHARED_UNRESV)) source_p->servptr->name, SHARED_UNRESV))
return; return;
if(remove_temp_resv(source_p, name)) if(remove_temp_resv(source_p, name))

View File

@ -90,7 +90,6 @@ do_local_user(struct Client *client_p, struct Client *source_p,
s_assert(source_p->username != username); s_assert(source_p->username != username);
user = make_user(source_p); user = make_user(source_p);
user->server = me.name;
if (!(source_p->flags & FLAGS_SENTUSER)) if (!(source_p->flags & FLAGS_SENTUSER))
{ {

View File

@ -244,7 +244,7 @@ who_common_channel(struct Client *source_p, struct Channel *chptr,
{ {
if((mask == NULL) || if((mask == NULL) ||
match(mask, target_p->name) || match(mask, target_p->username) || match(mask, target_p->name) || match(mask, target_p->username) ||
match(mask, target_p->host) || match(mask, target_p->user->server) || match(mask, target_p->host) || match(mask, target_p->servptr->name) ||
(IsOper(source_p) && match(mask, target_p->orighost)) || (IsOper(source_p) && match(mask, target_p->orighost)) ||
match(mask, target_p->info)) match(mask, target_p->info))
{ {
@ -313,7 +313,7 @@ who_global(struct Client *source_p, const char *mask, int server_oper, int opers
{ {
if(!mask || if(!mask ||
match(mask, target_p->name) || match(mask, target_p->username) || match(mask, target_p->name) || match(mask, target_p->username) ||
match(mask, target_p->host) || match(mask, target_p->user->server) || match(mask, target_p->host) || match(mask, target_p->servptr->name) ||
(IsOper(source_p) && match(mask, target_p->orighost)) || (IsOper(source_p) && match(mask, target_p->orighost)) ||
match(mask, target_p->info)) match(mask, target_p->info))
{ {
@ -385,7 +385,7 @@ do_who(struct Client *source_p, struct Client *target_p, const char *chname, con
sendto_one(source_p, form_str(RPL_WHOREPLY), me.name, source_p->name, sendto_one(source_p, form_str(RPL_WHOREPLY), me.name, source_p->name,
(chname) ? (chname) : "*", (chname) ? (chname) : "*",
target_p->username, target_p->username,
target_p->host, target_p->user->server, target_p->name, target_p->host, target_p->servptr->name, target_p->name,
status, status,
ConfigServerHide.flatten_links ? 0 : target_p->hopcount, ConfigServerHide.flatten_links ? 0 : target_p->hopcount,
target_p->info); target_p->info);

View File

@ -201,7 +201,7 @@ do_whois(struct Client *client_p, struct Client *source_p, int parc, const char
snprintf(buffer, sizeof(buffer), "%s!%s@%s %s", snprintf(buffer, sizeof(buffer), "%s!%s@%s %s",
target_p->name, target_p->username, target_p->name, target_p->username,
target_p->host, target_p->user->server); target_p->host, target_p->servptr->name);
report_operspy(source_p, "WHOIS", buffer); report_operspy(source_p, "WHOIS", buffer);
} }
@ -312,7 +312,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
sendto_one(source_p, "%s", buf); sendto_one(source_p, "%s", buf);
sendto_one_numeric(source_p, RPL_WHOISSERVER, form_str(RPL_WHOISSERVER), sendto_one_numeric(source_p, RPL_WHOISSERVER, form_str(RPL_WHOISSERVER),
target_p->name, target_p->user->server, target_p->name, target_p->servptr->name,
a2client_p ? a2client_p->info : "*Not On This Net*"); a2client_p ? a2client_p->info : "*Not On This Net*");
if(target_p->user->away) if(target_p->user->away)

View File

@ -212,7 +212,7 @@ handle_remote_xline(struct Client *source_p, int temp_time,
struct ConfItem *aconf; struct ConfItem *aconf;
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->user->server, source_p->servptr->name,
(temp_time > 0) ? SHARED_TXLINE : SHARED_PXLINE)) (temp_time > 0) ? SHARED_TXLINE : SHARED_PXLINE))
return; return;
@ -524,7 +524,7 @@ static void
handle_remote_unxline(struct Client *source_p, const char *name) handle_remote_unxline(struct Client *source_p, const char *name)
{ {
if(!find_shared_conf(source_p->username, source_p->host, if(!find_shared_conf(source_p->username, source_p->host,
source_p->user->server, SHARED_UNXLINE)) source_p->servptr->name, SHARED_UNXLINE))
return; return;
if(remove_temp_xline(source_p, name)) if(remove_temp_xline(source_p, name))

View File

@ -695,7 +695,7 @@ burst_TS5(struct Client *client_p)
target_p->name, target_p->hopcount + 1, target_p->name, target_p->hopcount + 1,
(long) target_p->tsinfo, ubuf, (long) target_p->tsinfo, ubuf,
target_p->username, target_p->host, target_p->username, target_p->host,
target_p->user->server, target_p->info); target_p->servptr->name, target_p->info);
if(IsDynSpoof(target_p)) if(IsDynSpoof(target_p))
sendto_one(client_p, ":%s ENCAP * REALHOST %s", sendto_one(client_p, ":%s ENCAP * REALHOST %s",
@ -849,7 +849,7 @@ burst_TS6(struct Client *client_p)
(long) target_p->tsinfo, (long) target_p->tsinfo,
ubuf, ubuf,
target_p->username, target_p->host, target_p->username, target_p->host,
target_p->user->server, target_p->info); target_p->servptr->name, target_p->info);
if(!has_id(target_p) || !IsCapable(client_p, CAP_EUID)) if(!has_id(target_p) || !IsCapable(client_p, CAP_EUID))
{ {

View File

@ -637,7 +637,7 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
nick, source_p->hopcount + 1, nick, source_p->hopcount + 1,
(long) source_p->tsinfo, (long) source_p->tsinfo,
ubuf, source_p->username, source_p->host, ubuf, source_p->username, source_p->host,
user->server, source_p->info); source_p->servptr->name, source_p->info);
} }
else else
sendto_server(client_p, NULL, NOCAPS, NOCAPS, sendto_server(client_p, NULL, NOCAPS, NOCAPS,
@ -645,7 +645,7 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
nick, source_p->hopcount + 1, nick, source_p->hopcount + 1,
(long) source_p->tsinfo, (long) source_p->tsinfo,
ubuf, source_p->username, source_p->host, ubuf, source_p->username, source_p->host,
user->server, source_p->info); source_p->servptr->name, source_p->info);
if (IsDynSpoof(source_p)) if (IsDynSpoof(source_p))
{ {

View File

@ -39,6 +39,7 @@
#include "send.h" #include "send.h"
#include "s_conf.h" #include "s_conf.h"
#include "memory.h" #include "memory.h"
#include "scache.h"
/* internally defined function */ /* internally defined function */
static void add_whowas_to_clist(struct Whowas **, struct Whowas *); static void add_whowas_to_clist(struct Whowas **, struct Whowas *);
@ -86,7 +87,7 @@ void add_history(struct Client *client_p, int online)
else else
who->sockhost[0] = '\0'; who->sockhost[0] = '\0';
who->servername = client_p->user->server; who->servername = find_or_add(client_p->servptr->name);
if(online) if(online)
{ {