|
@@ -891,20 +891,18 @@ func (am *AccountManager) Verify(client *Client, account string, code string) er
|
891
|
891
|
}
|
892
|
892
|
if client != nil {
|
893
|
893
|
am.Login(client, clientAccount)
|
|
894
|
+ if client.AlwaysOn() {
|
|
895
|
+ client.markDirty(IncludeRealname)
|
|
896
|
+ }
|
894
|
897
|
}
|
|
898
|
+ // we may need to do nick enforcement here:
|
895
|
899
|
_, method := am.EnforcementStatus(casefoldedAccount, skeleton)
|
896
|
|
- if method != NickEnforcementNone {
|
|
900
|
+ if method == NickEnforcementStrict {
|
897
|
901
|
currentClient := am.server.clients.Get(casefoldedAccount)
|
898
|
|
- if currentClient == nil || currentClient == client || currentClient.Account() == casefoldedAccount {
|
899
|
|
- return nil
|
900
|
|
- }
|
901
|
|
- if method == NickEnforcementStrict {
|
|
902
|
+ if currentClient != nil && currentClient != client && currentClient.Account() != casefoldedAccount {
|
902
|
903
|
am.server.RandomlyRename(currentClient)
|
903
|
904
|
}
|
904
|
905
|
}
|
905
|
|
- if client.AlwaysOn() {
|
906
|
|
- client.markDirty(IncludeRealname)
|
907
|
|
- }
|
908
|
906
|
return nil
|
909
|
907
|
}
|
910
|
908
|
|