From 09802f7181cab6604c8043b2c100e8decc6b07dc Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Thu, 13 Oct 2016 16:44:36 +1000 Subject: [PATCH] constants: Remove unused constants. We may re-add MaxReplyLength later as a variable config option, similar to mammon. --- irc/constants.go | 4 +--- irc/websocket.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/irc/constants.go b/irc/constants.go index 49abdd4c..6b73fbcf 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -8,9 +8,7 @@ package irc import "fmt" const ( - SEM_VER = "0.2.0-unreleased" - CRLF = "\r\n" - MAX_REPLY_LEN = 512 - len(CRLF) + SEM_VER = "0.2.0-unreleased" ) var ( diff --git a/irc/websocket.go b/irc/websocket.go index 7db80b6a..4a8948d3 100644 --- a/irc/websocket.go +++ b/irc/websocket.go @@ -32,7 +32,7 @@ type WSContainer struct { func (this WSContainer) Read(msg []byte) (int, error) { ty, bytes, err := this.ReadMessage() if ty == websocket.TextMessage { - n := copy(msg, []byte(string(bytes)+CRLF+CRLF)) + n := copy(msg, []byte(string(bytes)+"\r\n\r\n")) return n, err } // Binary, and other kinds of messages, are thrown away.