X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/6fcb8629ae638cceeead036a7240821c9886fe0f..c88cdb00957d1bafae4587343b5ab7df14b75f8b:/src/s_serv.c diff --git a/src/s_serv.c b/src/s_serv.c index 86b4bfe..1c62d64 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_serv.c 3354 2007-04-03 09:21:31Z nenolod $ + * $Id: s_serv.c 3550 2007-08-09 06:47:26Z nenolod $ */ #include "stdinc.h" @@ -57,6 +57,7 @@ #include "channel.h" /* chcap_usage_counts stuff... */ #include "hook.h" #include "msg.h" +#include "reject.h" extern char *crypt(); @@ -694,7 +695,7 @@ burst_TS5(struct Client *client_p) target_p->name, target_p->hopcount + 1, (long) target_p->tsinfo, ubuf, target_p->username, target_p->host, - target_p->user->server, target_p->info); + target_p->servptr->name, target_p->info); if(IsDynSpoof(target_p)) sendto_one(client_p, ":%s ENCAP * REALHOST %s", @@ -848,7 +849,7 @@ burst_TS6(struct Client *client_p) (long) target_p->tsinfo, ubuf, 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)) { @@ -1048,15 +1049,8 @@ server_estab(struct Client *client_p) */ if(!EmptyString(server_p->spasswd)) { - /* kludge, if we're not using TS6, dont ever send - * ourselves as being TS6 capable. - */ - if(ServerInfo.use_ts6) - sendto_one(client_p, "PASS %s TS %d :%s", - server_p->spasswd, TS_CURRENT, me.id); - else - sendto_one(client_p, "PASS %s :TS", - server_p->spasswd); + sendto_one(client_p, "PASS %s TS %d :%s", + server_p->spasswd, TS_CURRENT, me.id); } /* pass info to new server */ @@ -1103,6 +1097,7 @@ server_estab(struct Client *client_p) set_chcap_usage_counts(client_p); dlinkAdd(client_p, &client_p->lnode, &me.serv->servers); + del_unknown_ip(client_p); dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &serv_list); dlinkAddTailAlloc(client_p, &global_serv_list); @@ -1129,6 +1124,11 @@ server_estab(struct Client *client_p) client_p->localClient->firsttime = CurrentTime; /* fixing eob timings.. -gnp */ + if((dlink_list_length(&lclient_list) + dlink_list_length(&serv_list)) > + (unsigned long)MaxConnectionCount) + MaxConnectionCount = dlink_list_length(&lclient_list) + + dlink_list_length(&serv_list); + /* Show the real host/IP to admins */ sendto_realops_snomask(SNO_GENERAL, L_ALL, "Link with %s established: (%s) link", @@ -1717,12 +1717,8 @@ serv_connect_callback(int fd, int status, void *data) */ if(!EmptyString(server_p->spasswd)) { - if(ServerInfo.use_ts6) - sendto_one(client_p, "PASS %s TS %d :%s", - server_p->spasswd, TS_CURRENT, me.id); - else - sendto_one(client_p, "PASS %s :TS", - server_p->spasswd); + sendto_one(client_p, "PASS %s TS %d :%s", + server_p->spasswd, TS_CURRENT, me.id); } /* pass my info to the new server */