3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-14 07:59:31 +01:00

Merge pull request #1028 from slingamn/cleanups

two cleanups
This commit is contained in:
Shivaram Lingamneni 2020-05-18 04:58:05 -07:00 committed by GitHub
commit c7aa337ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 10 deletions

View File

@ -1305,14 +1305,10 @@ func (am *AccountManager) Unregister(account string, erase bool) error {
delete(am.skeletonToAccount, additionalSkel) delete(am.skeletonToAccount, additionalSkel)
} }
for _, client := range clients { for _, client := range clients {
if config.Accounts.RequireSasl.Enabled {
client.Logout() client.Logout()
client.Quit(client.t("You are no longer authorized to be on this server"), nil) client.Quit(client.t("You are no longer authorized to be on this server"), nil)
// destroy acquires a semaphore so we can't call it while holding a lock // destroy acquires a semaphore so we can't call it while holding a lock
go client.destroy(nil) go client.destroy(nil)
} else {
am.logoutOfAccount(client)
}
} }
if err != nil && !erase { if err != nil && !erase {

View File

@ -18,7 +18,6 @@ import (
var ( var (
restrictedNicknames = []string{ restrictedNicknames = []string{
"=scene=", // used for rp commands "=scene=", // used for rp commands
"HistServ", // used to play back JOIN, PART, etc. to legacy clients
} }
restrictedCasefoldedNicks = make(map[string]bool) restrictedCasefoldedNicks = make(map[string]bool)