Browse Source

fix #572

tags/v1.2.0-rc1
Shivaram Lingamneni 4 years ago
parent
commit
bbf6c4a269
2 changed files with 5 additions and 4 deletions
  1. 2
    4
      irc/nickname.go
  2. 3
    0
      irc/server.go

+ 2
- 4
irc/nickname.go View File

@@ -86,12 +86,10 @@ func performNickChange(server *Server, client *Client, target *Client, session *
86 86
 		channel.history.Add(histItem)
87 87
 	}
88 88
 
89
-	target.nickTimer.Touch(rb)
90
-
91 89
 	if target.Registered() {
92 90
 		client.server.monitorManager.AlertAbout(target, true)
93
-	}
94
-	// else: Run() will attempt registration immediately after this
91
+		target.nickTimer.Touch(rb)
92
+	} // else: these will be deferred to the end of registration (see #572)
95 93
 	return true
96 94
 }
97 95
 

+ 3
- 0
irc/server.go View File

@@ -421,6 +421,9 @@ func (server *Server) playRegistrationBurst(session *Session) {
421 421
 	if server.logger.IsLoggingRawIO() {
422 422
 		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."))
423 423
 	}
424
+
425
+	// #572: defer nick warnings to the end of the registration burst
426
+	session.client.nickTimer.Touch(nil)
424 427
 }
425 428
 
426 429
 // t returns the translated version of the given string, based on the languages configured by the client.

Loading…
Cancel
Save