forked from External/ergo
user registration
This commit is contained in:
parent
faece3e7f8
commit
53e098067a
3 changed files with 45 additions and 19 deletions
|
|
@ -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>"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue