From 41566b05e739f71472542391b77a8b6071898f60 Mon Sep 17 00:00:00 2001 From: Emilio Escobar Date: Tue, 9 Jun 2020 11:34:18 -0700 Subject: [PATCH 1/3] Solution for issue #143, only decrease unknown if cptr is unknown. --- src/m_server.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/m_server.c b/src/m_server.c index 85c74387..5fd2d95d 100644 --- a/src/m_server.c +++ b/src/m_server.c @@ -101,9 +101,14 @@ do_server_estab(aClient *cptr) /* "refresh" inpath with host */ char *inpath = get_client_name(cptr, HIDEME); + /* + * Status will be knonwn upon incoming connection, + * outbound connections have status of connecting + */ + if (IsUnknown(cptr)) Count.unknown--; + SetServer(cptr); - Count.unknown--; Count.server++; Count.myserver++; @@ -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 */ @@ -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; @@ -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 */ @@ -928,4 +933,3 @@ int m_dkey(aClient *cptr, aClient *sptr, int parc, char *parv[]) #endif return 0; } - From c2859f1711c3b37903cf1551a10d0671cf284d9a Mon Sep 17 00:00:00 2001 From: Emilio Escobar Date: Wed, 10 Jun 2020 08:42:56 -0700 Subject: [PATCH 2/3] Fixing typo in coment --- src/m_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/m_server.c b/src/m_server.c index 5fd2d95d..b0074302 100644 --- a/src/m_server.c +++ b/src/m_server.c @@ -102,11 +102,11 @@ do_server_estab(aClient *cptr) char *inpath = get_client_name(cptr, HIDEME); /* - * Status will be knonwn upon incoming connection, + * Incomming connections will have unknown status, * outbound connections have status of connecting */ if (IsUnknown(cptr)) Count.unknown--; - + SetServer(cptr); Count.server++; From dbb992b8a14be99e005cb368004f51d31a66c393 Mon Sep 17 00:00:00 2001 From: "Emilio A. Escobar" Date: Wed, 10 Jun 2020 09:15:50 -0700 Subject: [PATCH 3/3] Update src/m_server.c to fix my bad grammar Co-authored-by: crigler --- src/m_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_server.c b/src/m_server.c index b0074302..657787fb 100644 --- a/src/m_server.c +++ b/src/m_server.c @@ -102,7 +102,7 @@ do_server_estab(aClient *cptr) char *inpath = get_client_name(cptr, HIDEME); /* - * Incomming connections will have unknown status, + * Incoming connections have unknown status, * outbound connections have status of connecting */ if (IsUnknown(cptr)) Count.unknown--;