File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1187,12 +1187,18 @@ func (client *Client) LoggedIntoAccount() bool {
11871187// (You must ensure separately that destroy() is called, e.g., by returning `true` from
11881188// the command handler or calling it yourself.)
11891189func (client * Client ) Quit (message string , session * Session ) {
1190+ nuh := client .NickMaskString ()
1191+ now := time .Now ().UTC ()
1192+
11901193 setFinalData := func (sess * Session ) {
11911194 message := sess .quitMessage
11921195 var finalData []byte
11931196 // #364: don't send QUIT lines to unregistered clients
11941197 if client .registered {
1195- quitMsg := ircmsg .MakeMessage (nil , client .nickMaskString , "QUIT" , message )
1198+ quitMsg := ircmsg .MakeMessage (nil , nuh , "QUIT" , message )
1199+ if session .capabilities .Has (caps .ServerTime ) {
1200+ quitMsg .SetTag ("time" , now .Format (utils .IRCv3TimestampFormat ))
1201+ }
11961202 finalData , _ = quitMsg .LineBytesStrict (false , MaxLineLen )
11971203 }
11981204
You can’t perform that action at this time.
0 commit comments