3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-23 03:02:48 +01:00

make the land-grab check case-insensitive

This commit is contained in:
Shivaram Lingamneni 2019-02-10 05:53:36 -05:00
parent 44a0770215
commit 7786043275

View File

@ -311,7 +311,7 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames
// as an account; this prevents "land-grab" situations where someone else // as an account; this prevents "land-grab" situations where someone else
// registers your nick out from under you and then NS GHOSTs you // registers your nick out from under you and then NS GHOSTs you
// n.b. client is nil during a SAREGISTER: // n.b. client is nil during a SAREGISTER:
if config.NickReservation.Enabled && client != nil && client.Nick() != account { if config.NickReservation.Enabled && client != nil && client.NickCasefolded() != casefoldedAccount {
return errAccountMustHoldNick return errAccountMustHoldNick
} }