mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
commit
9b8562c211
@ -1320,6 +1320,11 @@ 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"))
|
||||
@ -1327,11 +1332,6 @@ func (channel *Channel) SendSplitMessage(command string, minPrefixMode modes.Mod
|
||||
}
|
||||
}
|
||||
|
||||
// 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]
|
||||
|
@ -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
|
||||
}
|
||||
|
2
irctest
2
irctest
@ -1 +1 @@
|
||||
Subproject commit af980ed3b639b5e1b3749c74027872adb69922a7
|
||||
Subproject commit 9856317a64e0b72f925bd1a77cbce7e0f460eb59
|
Loading…
Reference in New Issue
Block a user