1
0
Fork 0
forked from External/ergo

add data structures for decoding mode messages

This commit is contained in:
Jeremy Latt 2014-02-08 14:20:23 -08:00
parent b9cb539219
commit 3f9495cda0
4 changed files with 75 additions and 10 deletions

View file

@ -13,6 +13,7 @@ type Client struct {
channels ChannelSet
conn net.Conn
hostname string
invisible bool
nick string
realname string
registered bool
@ -30,11 +31,12 @@ func NewClient(server *Server, conn net.Conn) *Client {
replies := make(chan Reply)
client := &Client{
channels: make(ChannelSet),
conn: conn,
hostname: LookupHostname(conn.RemoteAddr()),
replies: replies,
server: server,
channels: make(ChannelSet),
conn: conn,
hostname: LookupHostname(conn.RemoteAddr()),
replies: replies,
server: server,
serverPass: server.password == "",
}
go client.readConn(read)
@ -86,6 +88,9 @@ func (c *Client) Nick() string {
}
func (c *Client) UModeString() string {
if c.invisible {
return "i"
}
return ""
}