Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions irc/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1320,18 +1320,18 @@ func (channel *Channel) SendSplitMessage(command string, minPrefixMode modes.Mod
isBot := client.HasMode(modes.Bot)
chname := channel.Name()

// STATUSMSG targets are prefixed with the supplied min-prefix, e.g., @#channel
if minPrefixMode != modes.Mode(0) {
chname = fmt.Sprintf("%s%s", modes.ChannelModePrefixes[minPrefixMode], chname)
}

if !client.server.Config().Server.Compatibility.allowTruncation {
if !validateSplitMessageLen(histType, details.nickMask, chname, message) {
rb.Add(nil, client.server.name, ERR_INPUTTOOLONG, details.nick, client.t("Line too long to be relayed without truncation"))
return
}
}

// STATUSMSG targets are prefixed with the supplied min-prefix, e.g., @#channel
if minPrefixMode != modes.Mode(0) {
chname = fmt.Sprintf("%s%s", modes.ChannelModePrefixes[minPrefixMode], chname)
}

if channel.flags.HasMode(modes.OpModerated) {
channel.stateMutex.RLock()
cuData, ok := channel.members[client]
Expand Down
1 change: 1 addition & 0 deletions irc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2184,6 +2184,7 @@ func validateLineLen(msgType history.ItemType, source, target, payload string) (
default:
return true
}
limit -= len(target)
limit -= len(payload)
return limit >= 0
}
Expand Down
2 changes: 1 addition & 1 deletion irctest