mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-18 13:38:10 -07:00
fix #2252
Fix SAREGISTER creating always-on clients with no user modes. Also fix UNREGISTER/ERASE not deleting the stored push subscriptions.
This commit is contained in:
@@ -428,6 +428,13 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
||||
c.SetMode(defaultMode, true)
|
||||
}
|
||||
|
||||
// this is not a reattach, so if the client is always-on, this is the first time
|
||||
// the Client object was created during the current server uptime. mark dirty in
|
||||
// order to persist the realname and the user modes:
|
||||
if c.AlwaysOn() {
|
||||
c.markDirty(IncludeAllAttrs)
|
||||
}
|
||||
|
||||
// count new user in statistics (before checking KLINEs, see #1303)
|
||||
server.stats.Register(c.HasMode(modes.Invisible))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user