mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-11 15:23:31 -07:00
fix #1214
This commit is contained in:
+8
-10
@@ -891,20 +891,18 @@ func (am *AccountManager) Verify(client *Client, account string, code string) er
|
||||
}
|
||||
if client != nil {
|
||||
am.Login(client, clientAccount)
|
||||
}
|
||||
_, method := am.EnforcementStatus(casefoldedAccount, skeleton)
|
||||
if method != NickEnforcementNone {
|
||||
currentClient := am.server.clients.Get(casefoldedAccount)
|
||||
if currentClient == nil || currentClient == client || currentClient.Account() == casefoldedAccount {
|
||||
return nil
|
||||
if client.AlwaysOn() {
|
||||
client.markDirty(IncludeRealname)
|
||||
}
|
||||
if method == NickEnforcementStrict {
|
||||
}
|
||||
// we may need to do nick enforcement here:
|
||||
_, method := am.EnforcementStatus(casefoldedAccount, skeleton)
|
||||
if method == NickEnforcementStrict {
|
||||
currentClient := am.server.clients.Get(casefoldedAccount)
|
||||
if currentClient != nil && currentClient != client && currentClient.Account() != casefoldedAccount {
|
||||
am.server.RandomlyRename(currentClient)
|
||||
}
|
||||
}
|
||||
if client.AlwaysOn() {
|
||||
client.markDirty(IncludeRealname)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user