3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

Merge pull request #1328 from slingamn/issue1326_lusersagain

fix #1326
This commit is contained in:
Shivaram Lingamneni 2020-10-15 10:41:18 -07:00 committed by GitHub
commit a412870514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}