3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

commands: Timeout unregistered clients

This commit is contained in:
Daniel Oaks 2017-05-09 20:36:45 +10:00
parent ff82872934
commit fb63691c8b

View File

@ -41,7 +41,8 @@ func (cmd *Command) Run(server *Server, client *Client, msg ircmsg.IrcMessage) b
if !cmd.leaveClientActive { if !cmd.leaveClientActive {
client.Active() client.Active()
} }
if !cmd.leaveClientIdle { // only touch client if they're registered so that unregistered clients timeout appropriately
if client.registered && !cmd.leaveClientIdle {
client.Touch() client.Touch()
} }
exiting := cmd.handler(server, client, msg) exiting := cmd.handler(server, client, msg)