1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-09-06 00:43:20 +00:00

Make split marker configurable; tests.

This commit is contained in:
Alex Bramley 2025-09-05 15:23:38 +01:00
parent 53eac75162
commit de089e2f58
3 changed files with 80 additions and 54 deletions

View file

@ -136,6 +136,8 @@ type Config struct {
// Split PRIVMSGs, NOTICEs and CTCPs longer than SplitLen characters
// over multiple lines. Default to 450 if not set.
SplitLen int
// Defaults to appending "..." to a split line to indicate a split.
SplitMarker string
}
// NewConfig creates a Config struct containing sensible defaults.
@ -149,6 +151,7 @@ func NewConfig(nick string, args ...string) *Config {
NewNick: DefaultNewNick,
Recover: (*Conn).LogPanic, // in dispatch.go
SplitLen: defaultSplit,
SplitMarker: defaultMarker,
Timeout: 60 * time.Second,
EnableCapabilityNegotiation: false,
}