From 328f6013f3ca3d3e8cd4240e12b7184d1f2dd22b Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 15 Oct 2020 13:03:44 -0400 Subject: [PATCH] fix #1326 --- irc/server.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/irc/server.go b/irc/server.go index 3fd875d6..328166f7 100644 --- a/irc/server.go +++ b/irc/server.go @@ -301,6 +301,13 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) { return false } + // Apply default user modes (without updating the invisible counter) + // The number of invisible users will be updated by server.stats.Register + // if we're using default user mode +i. + for _, defaultMode := range config.Accounts.defaultUserModes { + c.SetMode(defaultMode, true) + } + // count new user in statistics (before checking KLINEs, see #1303) server.stats.Register(c.HasMode(modes.Invisible)) @@ -311,13 +318,6 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) { return true } - // Apply default user modes (without updating the invisible counter) - // The number of invisible users will be updated by server.stats.Register - // if we're using default user mode +i. - for _, defaultMode := range config.Accounts.defaultUserModes { - c.SetMode(defaultMode, true) - } - server.playRegistrationBurst(session) return false }