From 5d7d510348d04e028099cfea86d580bef1f4b36e Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Mon, 19 Sep 2016 22:30:29 +1000 Subject: [PATCH] client: Fix minor bug when doing SASL before NICK/USER --- irc/client.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/irc/client.go b/irc/client.go index 30c5b909..c5e38961 100644 --- a/irc/client.go +++ b/irc/client.go @@ -61,17 +61,18 @@ func NewClient(server *Server, conn net.Conn, isTLS bool) *Client { now := time.Now() socket := NewSocket(conn) client := &Client{ - atime: now, - authorized: server.password == nil, - capState: CapNone, - capabilities: make(CapabilitySet), - channels: make(ChannelSet), - ctime: now, - flags: make(map[UserMode]bool), - server: server, - socket: &socket, - account: &NoAccount, - nickString: "*", // * is used until actual nick is given + atime: now, + authorized: server.password == nil, + capState: CapNone, + capabilities: make(CapabilitySet), + channels: make(ChannelSet), + ctime: now, + flags: make(map[UserMode]bool), + server: server, + socket: &socket, + account: &NoAccount, + nickString: "*", // * is used until actual nick is given + nickMaskString: "*", // * is used until actual nick is given } if isTLS { client.flags[TLS] = true