Shivaram Lingamneni hace 3 años
padre
commit
bcf581f63d
Se han modificado 1 ficheros con 6 adiciones y 8 borrados
  1. 6
    8
      irc/accounts.go

+ 6
- 8
irc/accounts.go Ver fichero

@@ -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
 

Loading…
Cancelar
Guardar