3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

client: Fix minor bug when doing SASL before NICK/USER

This commit is contained in:
Daniel Oaks 2016-09-19 22:30:29 +10:00
parent 32b328f53f
commit 5d7d510348

View File

@ -61,17 +61,18 @@ func NewClient(server *Server, conn net.Conn, isTLS bool) *Client {
now := time.Now() now := time.Now()
socket := NewSocket(conn) socket := NewSocket(conn)
client := &Client{ client := &Client{
atime: now, atime: now,
authorized: server.password == nil, authorized: server.password == nil,
capState: CapNone, capState: CapNone,
capabilities: make(CapabilitySet), capabilities: make(CapabilitySet),
channels: make(ChannelSet), channels: make(ChannelSet),
ctime: now, ctime: now,
flags: make(map[UserMode]bool), flags: make(map[UserMode]bool),
server: server, server: server,
socket: &socket, socket: &socket,
account: &NoAccount, account: &NoAccount,
nickString: "*", // * is used until actual nick is given nickString: "*", // * is used until actual nick is given
nickMaskString: "*", // * is used until actual nick is given
} }
if isTLS { if isTLS {
client.flags[TLS] = true client.flags[TLS] = true