accounts: Check for account logins correctly, fixes registration. Also fix a typo, thanks squigz!

This commit is contained in:
Daniel Oaks
2017-09-28 15:49:01 +10:00
parent 90435256fd
commit cd8b4877b6
4 changed files with 9 additions and 4 deletions
+5
View File
@@ -479,6 +479,11 @@ func (client *Client) ChangeNickname(nickname string) error {
return err
}
// LoggedIntoAccount returns true if this client is logged into an account.
func (client *Client) LoggedIntoAccount() bool {
return client.account != nil && client.account != &NoAccount
}
// Quit sends the given quit message to the client (but does not destroy them).
func (client *Client) Quit(message string) {
client.quitMutex.Lock()