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:
parent
c88cdb0095
commit
66c8fdd207
6 changed files with 5 additions and 33 deletions
|
@ -102,8 +102,6 @@ struct User
|
|||
struct Server
|
||||
{
|
||||
user_t *user; /* who activated this connection */
|
||||
const char *up; /* Pointer to scache name */
|
||||
const char *upid;
|
||||
char by[NICKLEN];
|
||||
dlink_list servers;
|
||||
dlink_list users;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "s_log.h" /* log level defines */
|
||||
#include "s_serv.h" /* server_estab, check_server */
|
||||
#include "s_stats.h" /* ServerStats */
|
||||
#include "scache.h" /* find_or_add */
|
||||
#include "send.h" /* sendto_one */
|
||||
#include "msg.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);
|
||||
|
||||
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;
|
||||
|
||||
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]);
|
||||
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;
|
||||
SetServer(target_p);
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ mo_links(struct Client *client_p, struct Client *source_p, int parc, const char
|
|||
* or theyre an oper..
|
||||
*/
|
||||
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->info[0] ? target_p->info : "(Unknown Location)");
|
||||
}
|
||||
|
|
12
src/client.c
12
src/client.c
|
@ -1455,11 +1455,7 @@ exit_remote_server(struct Client *client_p, struct Client *source_p, struct Clie
|
|||
strcpy(comment1, "*.net *.split");
|
||||
else
|
||||
{
|
||||
if((source_p->serv) && (source_p->serv->up))
|
||||
strcpy(comment1, source_p->serv->up);
|
||||
else
|
||||
strcpy(comment1, "<Unknown>");
|
||||
|
||||
strcpy(comment1, source_p->servptr->name);
|
||||
strcat(comment1, " ");
|
||||
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");
|
||||
else
|
||||
{
|
||||
if((source_p->serv) && (source_p->serv->up))
|
||||
strcpy(comment1, source_p->serv->up);
|
||||
else
|
||||
strcpy(comment1, "<Unknown>");
|
||||
|
||||
strcpy(comment1, source_p->servptr->name);
|
||||
strcat(comment1, " ");
|
||||
strcat(comment1, source_p->name);
|
||||
}
|
||||
|
|
|
@ -635,7 +635,6 @@ main(int argc, char *argv[])
|
|||
me.servptr = &me;
|
||||
SetMe(&me);
|
||||
make_server(&me);
|
||||
me.serv->up = me.name;
|
||||
startup_time = CurrentTime;
|
||||
add_to_client_hash(me.name, &me);
|
||||
add_to_id_hash(me.id, &me);
|
||||
|
|
10
src/s_serv.c
10
src/s_serv.c
|
@ -1107,8 +1107,6 @@ server_estab(struct Client *client_p)
|
|||
add_to_client_hash(client_p->name, client_p);
|
||||
/* doesnt duplicate client_p->serv if allocated this struct already */
|
||||
make_server(client_p);
|
||||
client_p->serv->up = me.name;
|
||||
client_p->serv->upid = me.id;
|
||||
|
||||
client_p->serv->caps = client_p->localClient->caps;
|
||||
|
||||
|
@ -1119,8 +1117,6 @@ server_estab(struct Client *client_p)
|
|||
client_p->localClient->fullcaps = NULL;
|
||||
}
|
||||
|
||||
/* add it to scache */
|
||||
find_or_add(client_p->name);
|
||||
client_p->localClient->firsttime = CurrentTime;
|
||||
/* fixing eob timings.. -gnp */
|
||||
|
||||
|
@ -1218,12 +1214,12 @@ server_estab(struct Client *client_p)
|
|||
/* presumption, if target has an id, so does its uplink */
|
||||
if(has_id(client_p) && has_id(target_p))
|
||||
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,
|
||||
IsHidden(target_p) ? "(H) " : "", target_p->info);
|
||||
else
|
||||
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,
|
||||
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);
|
||||
client_p->serv->user = NULL;
|
||||
}
|
||||
client_p->serv->up = me.name;
|
||||
client_p->serv->upid = me.id;
|
||||
SetConnecting(client_p);
|
||||
dlinkAddTail(client_p, &client_p->node, &global_client_list);
|
||||
|
||||
|
|
Loading…
Reference in a new issue