mirror of
https://github.com/ergochat/ergo.git
synced 2026-01-24 20:39:20 -08:00
Add nick changing support.
This commit is contained in:
parent
c42cd92f91
commit
fd814bf969
6 changed files with 61 additions and 36 deletions
|
|
@ -35,6 +35,16 @@ func (set UserSet) Remove(user *User) {
|
|||
delete(set, user)
|
||||
}
|
||||
|
||||
func (set UserSet) Nicks() []string {
|
||||
nicks := make([]string, len(set))
|
||||
i := 0
|
||||
for member := range set {
|
||||
nicks[i] = member.Nick()
|
||||
i++
|
||||
}
|
||||
return nicks
|
||||
}
|
||||
|
||||
func NewUser(nick string, password string, server *Server) *User {
|
||||
commands := make(chan UserCommand)
|
||||
replies := make(chan Reply)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue