mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
fix #1214
This commit is contained in:
parent
b3fd7e39f0
commit
bcf581f63d
@ -891,20 +891,18 @@ func (am *AccountManager) Verify(client *Client, account string, code string) er
|
|||||||
}
|
}
|
||||||
if client != nil {
|
if client != nil {
|
||||||
am.Login(client, clientAccount)
|
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 method == NickEnforcementStrict {
|
|
||||||
am.server.RandomlyRename(currentClient)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if client.AlwaysOn() {
|
if client.AlwaysOn() {
|
||||||
client.markDirty(IncludeRealname)
|
client.markDirty(IncludeRealname)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user