Przeglądaj źródła

fix: usernames from ident don't get a ~

tags/v1.0.0-rc1
Shivaram Lingamneni 5 lat temu
rodzic
commit
8438afcc5c
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3
    1
      irc/client.go

+ 3
- 1
irc/client.go Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz