mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
deprecate message truncation
Implements #1577, but the issue should remain open until we clean up the debugging loglines.
This commit is contained in:
parent
6fae02d335
commit
03185ea4a9
12 changed files with 148 additions and 29 deletions
|
|
@ -1361,6 +1361,15 @@ func (channel *Channel) SendSplitMessage(command string, minPrefixMode modes.Mod
|
|||
details := client.Details()
|
||||
chname := channel.Name()
|
||||
|
||||
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"))
|
||||
// TODO(#1577) remove this logline:
|
||||
client.server.logger.Debug("internal", "rejected truncation-requiring DM from client", details.nick)
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue