|
@@ -352,8 +352,6 @@ func batchHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
|
352
|
352
|
} else {
|
353
|
353
|
rb.session.batch.target = msg.Params[2]
|
354
|
354
|
// save the response label for later
|
355
|
|
- // XXX changing the label inside a handler is a bit dodgy, but it works here
|
356
|
|
- // because there's no way we could have triggered a flush up to this point
|
357
|
355
|
rb.session.batch.responseLabel = rb.Label
|
358
|
356
|
rb.Label = ""
|
359
|
357
|
}
|
|
@@ -366,12 +364,15 @@ func batchHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
|
366
|
364
|
} else {
|
367
|
365
|
batch := rb.session.batch
|
368
|
366
|
rb.session.batch = MultilineBatch{}
|
|
367
|
+ // time tag should correspond to the time when the message was completed
|
|
368
|
+ batch.message.SetTime()
|
369
|
369
|
histType, err := msgCommandToHistType(batch.command)
|
370
|
370
|
if err != nil {
|
371
|
371
|
histType = history.Privmsg
|
372
|
372
|
batch.command = "PRIVMSG"
|
373
|
373
|
}
|
374
|
|
- // see previous caution about modifying ResponseBuffer.Label
|
|
374
|
+ // XXX changing the label inside a handler is a bit dodgy, but it works here
|
|
375
|
+ // because there's no way we could have triggered a flush up to this point
|
375
|
376
|
rb.Label = batch.responseLabel
|
376
|
377
|
dispatchMessageToTarget(client, batch.tags, histType, batch.command, batch.target, batch.message, rb)
|
377
|
378
|
}
|