Use a better line-splitting algorithm

This commit is contained in:
Daniel Oaks 2017-01-18 08:05:31 +10:00
parent aad7aaba07
commit cbe49ff3d8
2 changed files with 26 additions and 37 deletions

View file

@ -500,10 +500,10 @@ func (client *Client) destroy() {
// Adds account-tag to the line as well.
func (client *Client) SendSplitMsgFromClient(msgid string, from *Client, tags *map[string]ircmsg.TagValue, command, target string, message SplitMessage) {
if client.capabilities[MaxLine] {
client.SendFromClient(msgid, from, tags, from.nickMaskString, command, target, message.ForMaxLine)
client.SendFromClient(msgid, from, tags, command, target, message.ForMaxLine)
} else {
for _, str := range message.For512 {
client.SendFromClient(msgid, from, tags, from.nickMaskString, command, target, str)
client.SendFromClient(msgid, from, tags, command, target, str)
}
}
}