ONICK command to allow operators to change users' nicks

This commit is contained in:
Jeremy Latt 2014-03-17 12:11:35 -07:00
parent abf00e22ec
commit 8c44bb9ff3
5 changed files with 116 additions and 66 deletions

View file

@ -227,6 +227,10 @@ func (client *Client) Friends() ClientSet {
}
func (client *Client) SetNickname(nickname Name) {
if client.HasNick() {
Log.error.Printf("%s nickname already set!", client)
return
}
client.nick = nickname
client.server.clients.Add(client)
}