mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
fix #814
This commit is contained in:
parent
ec1a718275
commit
ce208cb3e1
@ -54,22 +54,18 @@ func (cmd *Command) Run(server *Server, client *Client, session *Session, msg ir
|
||||
return cmd.handler(server, client, msg, rb)
|
||||
}()
|
||||
|
||||
// after each command, see if we can send registration to the client
|
||||
if !exiting && !client.registered {
|
||||
exiting = server.tryRegister(client, session)
|
||||
}
|
||||
|
||||
// most servers do this only for PING/PONG, but we'll do it for any command:
|
||||
if client.registered {
|
||||
// touch even if `exiting`, so we record the time of a QUIT accurately
|
||||
session.idletimer.Touch()
|
||||
}
|
||||
|
||||
if exiting {
|
||||
return
|
||||
}
|
||||
|
||||
// after each command, see if we can send registration to the client
|
||||
if !client.registered {
|
||||
exiting = server.tryRegister(client, session)
|
||||
}
|
||||
|
||||
if client.registered && !cmd.leaveClientIdle {
|
||||
if !exiting && client.registered && !cmd.leaveClientIdle {
|
||||
client.Active(session)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user