Remove Server.up and Server.upid.

Server.up is obsolete, like User.server.
Server.upid has never been really useful.
This commit is contained in:
Jilles Tjoelker 2007-11-22 00:38:13 +01:00
parent c88cdb0095
commit 66c8fdd207
6 changed files with 5 additions and 33 deletions

View file

@ -102,8 +102,6 @@ struct User
struct Server struct Server
{ {
user_t *user; /* who activated this connection */ user_t *user; /* who activated this connection */
const char *up; /* Pointer to scache name */
const char *upid;
char by[NICKLEN]; char by[NICKLEN];
dlink_list servers; dlink_list servers;
dlink_list users; dlink_list users;

View file

@ -38,7 +38,6 @@
#include "s_log.h" /* log level defines */ #include "s_log.h" /* log level defines */
#include "s_serv.h" /* server_estab, check_server */ #include "s_serv.h" /* server_estab, check_server */
#include "s_stats.h" /* ServerStats */ #include "s_stats.h" /* ServerStats */
#include "scache.h" /* find_or_add */
#include "send.h" /* sendto_one */ #include "send.h" /* sendto_one */
#include "msg.h" #include "msg.h"
#include "parse.h" #include "parse.h"
@ -418,11 +417,6 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
set_server_gecos(target_p, info); set_server_gecos(target_p, info);
target_p->serv->up = find_or_add(source_p->name);
if(has_id(source_p))
target_p->serv->upid = source_p->id;
target_p->servptr = source_p; target_p->servptr = source_p;
SetServer(target_p); SetServer(target_p);
@ -570,11 +564,6 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
strcpy(target_p->id, parv[3]); strcpy(target_p->id, parv[3]);
set_server_gecos(target_p, parv[4]); set_server_gecos(target_p, parv[4]);
target_p->serv->up = find_or_add(source_p->name);
if(has_id(source_p))
target_p->serv->upid = source_p->id;
target_p->servptr = source_p; target_p->servptr = source_p;
SetServer(target_p); SetServer(target_p);

View file

@ -120,7 +120,7 @@ mo_links(struct Client *client_p, struct Client *source_p, int parc, const char
* or theyre an oper.. * or theyre an oper..
*/ */
sendto_one_numeric(source_p, RPL_LINKS, form_str(RPL_LINKS), sendto_one_numeric(source_p, RPL_LINKS, form_str(RPL_LINKS),
target_p->name, target_p->serv->up, target_p->name, target_p->servptr->name,
target_p->hopcount, target_p->hopcount,
target_p->info[0] ? target_p->info : "(Unknown Location)"); target_p->info[0] ? target_p->info : "(Unknown Location)");
} }

View file

@ -1455,11 +1455,7 @@ exit_remote_server(struct Client *client_p, struct Client *source_p, struct Clie
strcpy(comment1, "*.net *.split"); strcpy(comment1, "*.net *.split");
else else
{ {
if((source_p->serv) && (source_p->serv->up)) strcpy(comment1, source_p->servptr->name);
strcpy(comment1, source_p->serv->up);
else
strcpy(comment1, "<Unknown>");
strcat(comment1, " "); strcat(comment1, " ");
strcat(comment1, source_p->name); strcat(comment1, source_p->name);
} }
@ -1567,11 +1563,7 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien
strcpy(comment1, "*.net *.split"); strcpy(comment1, "*.net *.split");
else else
{ {
if((source_p->serv) && (source_p->serv->up)) strcpy(comment1, source_p->servptr->name);
strcpy(comment1, source_p->serv->up);
else
strcpy(comment1, "<Unknown>");
strcat(comment1, " "); strcat(comment1, " ");
strcat(comment1, source_p->name); strcat(comment1, source_p->name);
} }

View file

@ -635,7 +635,6 @@ main(int argc, char *argv[])
me.servptr = &me; me.servptr = &me;
SetMe(&me); SetMe(&me);
make_server(&me); make_server(&me);
me.serv->up = me.name;
startup_time = CurrentTime; startup_time = CurrentTime;
add_to_client_hash(me.name, &me); add_to_client_hash(me.name, &me);
add_to_id_hash(me.id, &me); add_to_id_hash(me.id, &me);

View file

@ -1107,8 +1107,6 @@ server_estab(struct Client *client_p)
add_to_client_hash(client_p->name, client_p); add_to_client_hash(client_p->name, client_p);
/* doesnt duplicate client_p->serv if allocated this struct already */ /* doesnt duplicate client_p->serv if allocated this struct already */
make_server(client_p); make_server(client_p);
client_p->serv->up = me.name;
client_p->serv->upid = me.id;
client_p->serv->caps = client_p->localClient->caps; client_p->serv->caps = client_p->localClient->caps;
@ -1119,8 +1117,6 @@ server_estab(struct Client *client_p)
client_p->localClient->fullcaps = NULL; client_p->localClient->fullcaps = NULL;
} }
/* add it to scache */
find_or_add(client_p->name);
client_p->localClient->firsttime = CurrentTime; client_p->localClient->firsttime = CurrentTime;
/* fixing eob timings.. -gnp */ /* fixing eob timings.. -gnp */
@ -1218,12 +1214,12 @@ server_estab(struct Client *client_p)
/* presumption, if target has an id, so does its uplink */ /* presumption, if target has an id, so does its uplink */
if(has_id(client_p) && has_id(target_p)) if(has_id(client_p) && has_id(target_p))
sendto_one(client_p, ":%s SID %s %d %s :%s%s", sendto_one(client_p, ":%s SID %s %d %s :%s%s",
target_p->serv->upid, target_p->name, target_p->servptr->id, target_p->name,
target_p->hopcount + 1, target_p->id, target_p->hopcount + 1, target_p->id,
IsHidden(target_p) ? "(H) " : "", target_p->info); IsHidden(target_p) ? "(H) " : "", target_p->info);
else else
sendto_one(client_p, ":%s SERVER %s %d :%s%s", sendto_one(client_p, ":%s SERVER %s %d :%s%s",
target_p->serv->up, target_p->servptr->name,
target_p->name, target_p->hopcount + 1, target_p->name, target_p->hopcount + 1,
IsHidden(target_p) ? "(H) " : "", target_p->info); IsHidden(target_p) ? "(H) " : "", target_p->info);
@ -1565,8 +1561,6 @@ serv_connect(struct server_conf *server_p, struct Client *by)
free_user(client_p->serv->user, NULL); free_user(client_p->serv->user, NULL);
client_p->serv->user = NULL; client_p->serv->user = NULL;
} }
client_p->serv->up = me.name;
client_p->serv->upid = me.id;
SetConnecting(client_p); SetConnecting(client_p);
dlinkAddTail(client_p, &client_p->node, &global_client_list); dlinkAddTail(client_p, &client_p->node, &global_client_list);