mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08: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:
parent
808799b100
commit
686ce4d5b2
4 changed files with 14 additions and 7 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue