From bbf6c4a269f51a43174d9b0fdb9c7f3456cf4de2 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 8 Jul 2019 20:51:14 -0400 Subject: [PATCH] fix #572 --- irc/nickname.go | 6 ++---- irc/server.go | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/irc/nickname.go b/irc/nickname.go index 5fc3952d..2c7140c9 100644 --- a/irc/nickname.go +++ b/irc/nickname.go @@ -86,12 +86,10 @@ func performNickChange(server *Server, client *Client, target *Client, session * channel.history.Add(histItem) } - target.nickTimer.Touch(rb) - if target.Registered() { client.server.monitorManager.AlertAbout(target, true) - } - // else: Run() will attempt registration immediately after this + target.nickTimer.Touch(rb) + } // else: these will be deferred to the end of registration (see #572) return true } diff --git a/irc/server.go b/irc/server.go index 436b607e..2ecc7b45 100644 --- a/irc/server.go +++ b/irc/server.go @@ -421,6 +421,9 @@ func (server *Server) playRegistrationBurst(session *Session) { if server.logger.IsLoggingRawIO() { session.Send(nil, c.server.name, "NOTICE", d.nick, c.t("This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.")) } + + // #572: defer nick warnings to the end of the registration burst + session.client.nickTimer.Touch(nil) } // t returns the translated version of the given string, based on the languages configured by the client.