forked from External/ergo
Merge branch 'persistent.14'
This commit is contained in:
commit
fb8b73e29a
76 changed files with 9725 additions and 772 deletions
|
|
@ -54,6 +54,12 @@ func (cmd *Command) Run(server *Server, client *Client, session *Session, msg ir
|
|||
return cmd.handler(server, client, msg, rb)
|
||||
}()
|
||||
|
||||
// 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
|
||||
}
|
||||
|
|
@ -63,11 +69,6 @@ func (cmd *Command) Run(server *Server, client *Client, session *Session, msg ir
|
|||
exiting = server.tryRegister(client, session)
|
||||
}
|
||||
|
||||
// most servers do this only for PING/PONG, but we'll do it for any command:
|
||||
if client.registered {
|
||||
session.idletimer.Touch()
|
||||
}
|
||||
|
||||
if client.registered && !cmd.leaveClientIdle {
|
||||
client.Active(session)
|
||||
}
|
||||
|
|
@ -109,7 +110,7 @@ func init() {
|
|||
},
|
||||
"CHATHISTORY": {
|
||||
handler: chathistoryHandler,
|
||||
minParams: 3,
|
||||
minParams: 4,
|
||||
},
|
||||
"DEBUG": {
|
||||
handler: debugHandler,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue