3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-10-13 22:17:27 +02:00

fix panic on KILL (#2234)

Introduced by #2218, reported by knolle
This commit is contained in:
Shivaram Lingamneni 2025-03-26 21:21:05 -04:00 committed by GitHub
parent 467df24914
commit 19dbe10c99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1196,7 +1196,7 @@ func (client *Client) Quit(message string, session *Session) {
// #364: don't send QUIT lines to unregistered clients // #364: don't send QUIT lines to unregistered clients
if client.registered { if client.registered {
quitMsg := ircmsg.MakeMessage(nil, nuh, "QUIT", message) quitMsg := ircmsg.MakeMessage(nil, nuh, "QUIT", message)
if session.capabilities.Has(caps.ServerTime) { if sess.capabilities.Has(caps.ServerTime) {
quitMsg.SetTag("time", now.Format(utils.IRCv3TimestampFormat)) quitMsg.SetTag("time", now.Format(utils.IRCv3TimestampFormat))
} }
finalData, _ = quitMsg.LineBytesStrict(false, MaxLineLen) finalData, _ = quitMsg.LineBytesStrict(false, MaxLineLen)