3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-29 15:40:02 +01:00

constants: Remove unused constants.

We may re-add MaxReplyLength later as a variable config option, similar to mammon.
This commit is contained in:
Daniel Oaks 2016-10-13 16:44:36 +10:00
parent 3c2fae666a
commit 09802f7181
2 changed files with 2 additions and 4 deletions

View File

@ -8,9 +8,7 @@ package irc
import "fmt" import "fmt"
const ( const (
SEM_VER = "0.2.0-unreleased" SEM_VER = "0.2.0-unreleased"
CRLF = "\r\n"
MAX_REPLY_LEN = 512 - len(CRLF)
) )
var ( var (

View File

@ -32,7 +32,7 @@ type WSContainer struct {
func (this WSContainer) Read(msg []byte) (int, error) { func (this WSContainer) Read(msg []byte) (int, error) {
ty, bytes, err := this.ReadMessage() ty, bytes, err := this.ReadMessage()
if ty == websocket.TextMessage { 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 return n, err
} }
// Binary, and other kinds of messages, are thrown away. // Binary, and other kinds of messages, are thrown away.