Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only decrease unknown count if cptr is in unknown state #160

Merged
merged 6 commits into from
May 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/m_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ do_server_estab(aClient *cptr)
/* "refresh" inpath with host */
char *inpath = get_client_name(cptr, HIDEME);

/*
* Incoming connections have unknown status,
* outbound connections have status of connecting
*/
if (IsUnknown(cptr)) Count.unknown--;

SetServer(cptr);

Count.unknown--;
Count.server++;
Count.myserver++;

Expand Down Expand Up @@ -435,7 +440,7 @@ m_server_estab(aClient *cptr)
my_name_for_link(me.name, aconn),
(me.info[0]) ? (me.info) : "IRCers United");
}
else
else
{
s = (char *) strchr(aconn->host, '@');
*s = '\0'; /* should never be NULL -- wanna bet? -Dianora */
Expand Down Expand Up @@ -648,7 +653,7 @@ int m_server(aClient *cptr, aClient *sptr, int parc, char *parv[])
return exit_client(cptr, cptr, cptr, "No Connect block");
}
}

/* already linked server */
if (!IsServer(cptr))
return 0;
Expand Down Expand Up @@ -808,7 +813,7 @@ int m_server(aClient *cptr, aClient *sptr, int parc, char *parv[])

/* m_dkey
* lucas's code, i assume.
* moved here from s_serv.c due to its integration in the encrypted
* moved here from s_serv.c due to its integration in the encrypted
* server negotiation stuffs. -epi
*/

Expand Down Expand Up @@ -928,4 +933,3 @@ int m_dkey(aClient *cptr, aClient *sptr, int parc, char *parv[])
#endif
return 0;
}