3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-13 07:29:30 +01:00

review fixes

This commit is contained in:
Shivaram Lingamneni 2017-11-22 16:35:38 -05:00
parent 52b0fb71e7
commit d5a5f939dd
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ func (clients *ClientManager) Get(nick string) *Client {
}
func (clients *ClientManager) removeInternal(client *Client) (removed bool) {
// requires holding ByNickMutex
// requires holding the writable Lock()
oldcfnick := client.NickCasefolded()
currentEntry, present := clients.byNick[oldcfnick]
if present {
@ -123,7 +123,7 @@ func (clients *ClientManager) AllClients() (result []*Client) {
defer clients.RUnlock()
result = make([]*Client, len(clients.byNick))
i := 0
for _, client := range(clients.byNick) {
for _, client := range clients.byNick {
result[i] = client
i++
}

View File

@ -61,7 +61,7 @@ func performNickChange(server *Server, client *Client, target *Client, newnick s
return false
}
client.server.logger.Debug("nick", fmt.Sprintf("%s changed nickname to %s", origNickMask, nickname))
client.server.logger.Debug("nick", fmt.Sprintf("%s changed nickname to %s [%s]", origNickMask, nicknameRaw, nickname))
if hadNick {
target.server.snomasks.Send(sno.LocalNicks, fmt.Sprintf(ircfmt.Unescape("$%s$r changed nickname to %s"), origNick, nicknameRaw))
target.server.whoWas.Append(client)