mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-26 22:09:24 +01:00
commit
56e673559b
@ -62,10 +62,13 @@ func performNickChange(server *Server, client *Client, target *Client, newnick s
|
||||
if hadNick {
|
||||
target.server.snomasks.Send(sno.LocalNicks, fmt.Sprintf(ircfmt.Unescape("$%s$r changed nickname to %s"), whowas.nick, nickname))
|
||||
target.server.whoWas.Append(whowas)
|
||||
rb.Add(nil, origNickMask, "NICK", nickname)
|
||||
for friend := range target.Friends() {
|
||||
if friend != client {
|
||||
friend.Send(nil, origNickMask, "NICK", nickname)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if target.Registered() {
|
||||
client.server.monitorManager.AlertAbout(target, true)
|
||||
|
@ -142,10 +142,10 @@ func (rb *ResponseBuffer) flushInternal(final bool, blocking bool) error {
|
||||
}
|
||||
|
||||
useLabel := rb.target.capabilities.Has(caps.LabeledResponse) && rb.Label != ""
|
||||
// use a batch if we have a label, and we either currently have multiple messages,
|
||||
// use a batch if we have a label, and we either currently have 0 or 2+ messages,
|
||||
// or we are doing a Flush() and we have to assume that there will be more messages
|
||||
// in the future.
|
||||
useBatch := useLabel && (len(rb.messages) > 1 || !final)
|
||||
useBatch := useLabel && (len(rb.messages) != 1 || !final)
|
||||
|
||||
// if label but no batch, add label to first message
|
||||
if useLabel && !useBatch && len(rb.messages) == 1 && rb.batchID == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user