diff --git a/irc/client.go b/irc/client.go index 007180eb..cf6089e9 100644 --- a/irc/client.go +++ b/irc/client.go @@ -211,7 +211,7 @@ func (client *Client) run() { } } // ensure client connection gets closed - client.destroy() + client.destroy(false) }() client.idletimer = NewIdleTimer(client) @@ -395,7 +395,7 @@ func (client *Client) TryResume() { server.clients.byNick[oldnick] = client - oldClient.destroy() + oldClient.destroy(false) } // IdleTime returns how long this client's been idle. diff --git a/irc/dline.go b/irc/dline.go index ccf54164..9d6ab404 100644 --- a/irc/dline.go +++ b/irc/dline.go @@ -406,7 +406,7 @@ func dlineHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { killClient = true } else { // if mcl == client, we kill them below - mcl.destroy() + mcl.destroy(false) } } diff --git a/irc/idletimer.go b/irc/idletimer.go index 48cae127..cfbf53f7 100644 --- a/irc/idletimer.go +++ b/irc/idletimer.go @@ -104,7 +104,7 @@ func (it *IdleTimer) processTimeout() { it.client.Ping() } else { it.client.Quit(it.quitMessage(previousState)) - it.client.destroy() + it.client.destroy(false) } } diff --git a/irc/kline.go b/irc/kline.go index 8ef05364..a7ba985b 100644 --- a/irc/kline.go +++ b/irc/kline.go @@ -298,7 +298,7 @@ func klineHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { killClient = true } else { // if mcl == client, we kill them below - mcl.destroy() + mcl.destroy(false) } } diff --git a/irc/server.go b/irc/server.go index 40f7fded..559cbee5 100644 --- a/irc/server.go +++ b/irc/server.go @@ -424,7 +424,7 @@ func (server *Server) tryRegister(c *Client) { reason += fmt.Sprintf(" [%s]", info.Time.Duration.String()) } c.Quit(fmt.Sprintf("You are banned from this server (%s)", reason)) - c.destroy() + c.destroy(false) return } @@ -2016,7 +2016,7 @@ func killHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { target.exitedSnomaskSent = true target.Quit(quitMsg) - target.destroy() + target.destroy(false) return false } @@ -2093,13 +2093,13 @@ func resumeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { var timestamp *time.Time if 1 < len(msg.Params) { - timestamp, err := time.Parse("2006-01-02T15:04:05.999Z", msg.Params[1]) + timestamp, err = time.Parse("2006-01-02T15:04:05.999Z", msg.Params[1]) if err != nil { client.Send(nil, server.name, ERR_CANNOT_RESUME, oldnick, "Timestamp is not in 2006-01-02T15:04:05.999Z format, ignoring it") } } - client.resumeDetails = ResumeDetails{ + client.resumeDetails = &ResumeDetails{ OldNick: oldnick, Timestamp: timestamp, }