|
@@ -154,8 +154,11 @@ func (m *MessageCache) InitializeSplitMessage(server *Server, nickmask, accountN
|
154
|
154
|
}
|
155
|
155
|
|
156
|
156
|
// we need to send the same batch ID to all recipient sessions;
|
157
|
|
- // use a uuidv4-alike to ensure that it won't collide
|
158
|
|
- batch := composeMultilineBatch(utils.GenerateSecretToken(), nickmask, accountName, tags, command, target, message)
|
|
157
|
+ // ensure it doesn't collide. a half-sized token has 64 bits of entropy,
|
|
158
|
+ // so a collision isn't expected until there are on the order of 2**32
|
|
159
|
+ // concurrent batches being relayed:
|
|
160
|
+ batchID := utils.GenerateSecretToken()[:utils.SecretTokenLength/2]
|
|
161
|
+ batch := composeMultilineBatch(batchID, nickmask, accountName, tags, command, target, message)
|
159
|
162
|
m.fullTagsMultiline = make([][]byte, len(batch))
|
160
|
163
|
for i, msg := range batch {
|
161
|
164
|
if forceTrailing {
|