forked from External/ergo
fix: store the uncasefolded account name correctly
This commit is contained in:
parent
df41f9b3b0
commit
878f9ca94c
2 changed files with 11 additions and 13 deletions
|
|
@ -578,18 +578,10 @@ type rawClientAccount struct {
|
|||
|
||||
// LoginToAccount logs the client into the given account.
|
||||
func (client *Client) LoginToAccount(account string) {
|
||||
casefoldedAccount, err := CasefoldName(account)
|
||||
if err != nil {
|
||||
return
|
||||
changed := client.SetAccountName(account)
|
||||
if changed {
|
||||
client.nickTimer.Touch()
|
||||
}
|
||||
|
||||
if client.Account() == casefoldedAccount {
|
||||
// already logged into this acct, no changing necessary
|
||||
return
|
||||
}
|
||||
|
||||
client.SetAccountName(casefoldedAccount)
|
||||
client.nickTimer.Touch()
|
||||
}
|
||||
|
||||
// LogoutOfAccount logs the client out of their current account.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue