natsim

NATS ↔ Instant Messaging Bridge
git clone https://git.instinctive.eu/natsim.git
Log | Files | Refs | README | LICENSE

commit 39ea6fb738c713ab3e391448c7b87b31be7822bf
parent 2c766a12990b0bd5d772a39c75993742672c624a
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Thu, 21 Aug 2025 21:25:32 +0000

Commands to set encoding maximum lengths
Diffstat:
Mmain.go | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/main.go b/main.go @@ -468,6 +468,33 @@ func (natsim *NatsIM) doCommands() { natsim.curMsg.Header[key] = append(natsim.curMsg.Header[key], value) } + case "max-base64": + fallthrough + case "maxbase64": + if val, err := strconv.Atoi(cmd.arg); err != nil { + natsim.ircSendError("Parse MaxBase64", err) + } else { + natsim.Irc.MaxBase64 = val + } + + case "max-hex": + fallthrough + case "maxhex": + if val, err := strconv.Atoi(cmd.arg); err != nil { + natsim.ircSendError("Parse MaxHex", err) + } else { + natsim.Irc.MaxHex = val + } + + case "max-quote-ratio": + fallthrough + case "maxquoteratio": + if val, err := strconv.ParseFloat(cmd.arg, 32); err != nil { + natsim.ircSendError("Parse MaxQuoteRatio", err) + } else { + natsim.Irc.MaxQuoteRatio = float32(val) + } + case "new-inbox": fallthrough case "newinbox":