1
0
Fork 0
forked from External/ergo

fix: store the uncasefolded account name correctly

This commit is contained in:
Shivaram Lingamneni 2018-02-20 04:50:46 -05:00
parent df41f9b3b0
commit 878f9ca94c
2 changed files with 11 additions and 13 deletions

View file

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