client.go
func NewClient(username, oauth string) *Client {
	return &Client{
		ircUser:         username,
		ircToken:        oauth,
		TLS:             true,
		channels:        map[string]bool{},
		channelUserlist: map[string]map[string]bool{},
		channelsMtx:     &sync.RWMutex{},
		messageReceived: make(chan bool),

		read:  make(chan string, ReadBufferSize),
		write: make(chan string, WriteBufferSize),

		// NOTE: IdlePingInterval must be higher than PongTimeout
		SendPings:        true,
		IdlePingInterval: time.Second * 15,
		PongTimeout:      time.Second * 5,

		channelUserlistMutex: &sync.RWMutex{},
	}
}
func NewClient(username, oauth string) *Client {
	return &Client{
		ircUser:         username,
		ircToken:        oauth,
		TLS:             true,
		channels:        map[string]bool{},
		channelUserlist: map[string]map[string]bool{},
		channelsMtx:     &sync.RWMutex{},
		messageReceived: make(chan bool),

		read:  make(chan string, ReadBufferSize),
		write: make(chan string, WriteBufferSize),

		// NOTE: IdlePingInterval must be higher than PongTimeout
		SendPings:        true,
		IdlePingInterval: time.Second * 15,
		PongTimeout:      time.Second * 5,

		channelUserlistMutex: &sync.RWMutex{},
	}
}
func NewClient ( username , oauth string ) * Client { return & Client { ircUser : username , ircToken : oauth , TLS : true , channels : map [ string ] bool { } , channelUserlist : map [ string ] map [ string ] bool { } , channelsMtx : & sync . RWMutex { } , messageReceived : make ( chan bool ) , read : make ( chan string , ReadBufferSize ) , write : make ( chan string , WriteBufferSize ) , // NOTE: IdlePingInterval must be higher than PongTimeout SendPings : true , IdlePingInterval : time . Second * 15 , PongTimeout : time . Second * 5 , channelUserlistMutex : & sync . RWMutex { } , } }
// NewClient to create a new client
NewClient to create a new client