From 5bedeaa9bfe9841a49e5fc6e9228a42e513c9e8e Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 18 Oct 2017 15:43:13 +0200 Subject: [PATCH] Set cptr->name after EAUTH. Fixes bug #4915 reported by Eman: missing server name in link rejection message (clock mismatch). --- src/modules/m_protoctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/m_protoctl.c b/src/modules/m_protoctl.c index c4c55e676..801b6e822 100644 --- a/src/modules/m_protoctl.c +++ b/src/modules/m_protoctl.c @@ -335,6 +335,11 @@ CMD_FUNC(m_protoctl) SetEAuth(cptr); make_server(cptr); /* allocate and set cptr->serv */ + /* Set cptr->name but don't add to hash list. The real work on + * that is done in m_server. We just set it here for display + * purposes of error messages (such as reject due to clock). + */ + strlcpy(cptr->name, servername, sizeof(cptr->name)); if (protocol) cptr->serv->features.protocol = atoi(protocol); if (!IsHandshake(cptr) && aconf) /* Send PASS early... */