user registration

This commit is contained in:
Jeremy Latt
2012-04-09 07:57:55 -07:00
parent faece3e7f8
commit 53e098067a
3 changed files with 45 additions and 19 deletions
+8
View File
@@ -19,6 +19,7 @@ type Client struct {
username string
realname string
nick string
registered bool
}
func NewClient(conn net.Conn) *Client {
@@ -45,3 +46,10 @@ func (c *Client) Send(lines ...string) {
c.send <- line
}
}
func (c *Client) Nick() string {
if c.nick != "" {
return c.nick
}
return "<guest>"
}