mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-05 16:18:10 -07:00
add data structures for decoding mode messages
This commit is contained in:
+10
-5
@@ -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 ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user