3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 21:39:25 +01:00

Fix build issues

This commit is contained in:
Daniel Oaks 2018-01-21 11:59:52 +10:00
parent d09f085b1a
commit ac99e82192
5 changed files with 9 additions and 9 deletions

View File

@ -211,7 +211,7 @@ func (client *Client) run() {
} }
} }
// ensure client connection gets closed // ensure client connection gets closed
client.destroy() client.destroy(false)
}() }()
client.idletimer = NewIdleTimer(client) client.idletimer = NewIdleTimer(client)
@ -395,7 +395,7 @@ func (client *Client) TryResume() {
server.clients.byNick[oldnick] = client server.clients.byNick[oldnick] = client
oldClient.destroy() oldClient.destroy(false)
} }
// IdleTime returns how long this client's been idle. // IdleTime returns how long this client's been idle.

View File

@ -406,7 +406,7 @@ func dlineHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
killClient = true killClient = true
} else { } else {
// if mcl == client, we kill them below // if mcl == client, we kill them below
mcl.destroy() mcl.destroy(false)
} }
} }

View File

@ -104,7 +104,7 @@ func (it *IdleTimer) processTimeout() {
it.client.Ping() it.client.Ping()
} else { } else {
it.client.Quit(it.quitMessage(previousState)) it.client.Quit(it.quitMessage(previousState))
it.client.destroy() it.client.destroy(false)
} }
} }

View File

@ -298,7 +298,7 @@ func klineHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
killClient = true killClient = true
} else { } else {
// if mcl == client, we kill them below // if mcl == client, we kill them below
mcl.destroy() mcl.destroy(false)
} }
} }

View File

@ -424,7 +424,7 @@ func (server *Server) tryRegister(c *Client) {
reason += fmt.Sprintf(" [%s]", info.Time.Duration.String()) reason += fmt.Sprintf(" [%s]", info.Time.Duration.String())
} }
c.Quit(fmt.Sprintf("You are banned from this server (%s)", reason)) c.Quit(fmt.Sprintf("You are banned from this server (%s)", reason))
c.destroy() c.destroy(false)
return return
} }
@ -2016,7 +2016,7 @@ func killHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
target.exitedSnomaskSent = true target.exitedSnomaskSent = true
target.Quit(quitMsg) target.Quit(quitMsg)
target.destroy() target.destroy(false)
return false return false
} }
@ -2093,13 +2093,13 @@ func resumeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
var timestamp *time.Time var timestamp *time.Time
if 1 < len(msg.Params) { 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 { 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.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, OldNick: oldnick,
Timestamp: timestamp, Timestamp: timestamp,
} }