forked from External/ergo
set the time of a multiline message at BATCH -
This commit is contained in:
parent
5d662742b9
commit
6e2b2a44b8
2 changed files with 8 additions and 6 deletions
|
|
@ -352,8 +352,6 @@ func batchHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
|
|||
} else {
|
||||
rb.session.batch.target = msg.Params[2]
|
||||
// save the response label for later
|
||||
// XXX changing the label inside a handler is a bit dodgy, but it works here
|
||||
// because there's no way we could have triggered a flush up to this point
|
||||
rb.session.batch.responseLabel = rb.Label
|
||||
rb.Label = ""
|
||||
}
|
||||
|
|
@ -366,12 +364,15 @@ func batchHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
|
|||
} else {
|
||||
batch := rb.session.batch
|
||||
rb.session.batch = MultilineBatch{}
|
||||
// time tag should correspond to the time when the message was completed
|
||||
batch.message.SetTime()
|
||||
histType, err := msgCommandToHistType(batch.command)
|
||||
if err != nil {
|
||||
histType = history.Privmsg
|
||||
batch.command = "PRIVMSG"
|
||||
}
|
||||
// see previous caution about modifying ResponseBuffer.Label
|
||||
// XXX changing the label inside a handler is a bit dodgy, but it works here
|
||||
// because there's no way we could have triggered a flush up to this point
|
||||
rb.Label = batch.responseLabel
|
||||
dispatchMessageToTarget(client, batch.tags, histType, batch.command, batch.target, batch.message, rb)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue