|
@@ -122,6 +122,7 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
122
|
122
|
accountName := client.accountName
|
123
|
123
|
settings := client.accountSettings
|
124
|
124
|
registered := client.registered
|
|
125
|
+ realname := client.realname
|
125
|
126
|
client.stateMutex.RUnlock()
|
126
|
127
|
|
127
|
128
|
// recompute always-on status, because client.alwaysOn is not set for unregistered clients
|
|
@@ -224,6 +225,10 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
224
|
225
|
client.server.stats.AddRegistered(invisible, operator)
|
225
|
226
|
}
|
226
|
227
|
session.autoreplayMissedSince = lastSeen
|
|
228
|
+ // TODO: transition mechanism for #1065, clean this up eventually:
|
|
229
|
+ if currentClient.Realname() == "" {
|
|
230
|
+ currentClient.SetRealname(realname)
|
|
231
|
+ }
|
227
|
232
|
// successful reattach!
|
228
|
233
|
return newNick, nil, back
|
229
|
234
|
} else if currentClient == client && currentClient.Nick() == newNick {
|