3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

fix: usernames from ident don't get a ~

This commit is contained in:
Shivaram Lingamneni 2019-01-28 23:35:00 -05:00
parent 4bbba5b478
commit 8438afcc5c

View File

@ -176,9 +176,11 @@ func NewClient(server *Server, conn net.Conn, isTLS bool) {
resp, err := ident.Query(clientHost, serverPort, clientPort, IdentTimeoutSeconds)
if err == nil {
username := resp.Identifier
err := client.SetNames(username, "")
cfusername, err := CasefoldName(username)
if err == nil {
client.Notice(client.t("*** Found your username"))
client.username = username
client.usernameCasefolded = cfusername
// we don't need to updateNickMask here since nickMask is not used for anything yet
} else {
client.Notice(client.t("*** Got a malformed username, ignoring"))