3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

fix client auth for no password

All clients are authorized if the server lacks a password.
This commit is contained in:
Jeremy Latt 2014-03-06 20:09:29 -08:00
parent 4bcd42ff34
commit f56db354ee
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ func NewClient(server *Server, conn net.Conn) *Client {
now := time.Now() now := time.Now()
client := &Client{ client := &Client{
atime: now, atime: now,
authorized: server.password == nil,
capState: CapNone, capState: CapNone,
capabilities: make(CapabilitySet), capabilities: make(CapabilitySet),
channels: make(ChannelSet), channels: make(ChannelSet),

View File

@ -23,7 +23,7 @@ var (
) )
const ( const (
SEM_VER = "ergonomadic-1.2.13" SEM_VER = "ergonomadic-1.2.14"
CRLF = "\r\n" CRLF = "\r\n"
MAX_REPLY_LEN = 512 - len(CRLF) MAX_REPLY_LEN = 512 - len(CRLF)