mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
Fix build issues
This commit is contained in:
parent
d09f085b1a
commit
ac99e82192
@ -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.
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user