summaryrefslogtreecommitdiffstats
path: root/irc/message.go
diff options
context:
space:
mode:
Diffstat (limited to 'irc/message.go')
-rw-r--r--irc/message.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/irc/message.go b/irc/message.go
index e1d448b..8d98ae8 100644
--- a/irc/message.go
+++ b/irc/message.go
@@ -288,6 +288,11 @@ func (m *Message) Bytes() []byte {
buffer.WriteString(m.Trailing)
}
+ // We need the limit the buffer length.
+ if buffer.Len() > (maxLength) {
+ buffer.Truncate(maxLength)
+ }
+
return buffer.Bytes()
}