Ver código fonte

temporarily assign the client a nick during reattach

(So that the registration burst displays correctly)
tags/v1.1.0-rc1
Shivaram Lingamneni 5 anos atrás
pai
commit
fe6a520fa4
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3
    1
      irc/client_lookup_set.go

+ 3
- 1
irc/client_lookup_set.go Ver arquivo

@@ -160,7 +160,9 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
160 160
 		if !currentClient.AddSession(session) {
161 161
 			return errNicknameInUse
162 162
 		}
163
-		// successful reattach:
163
+		// successful reattach. temporarily assign them the nick they'll have going forward
164
+		// (the current `client` will be discarded at the end of command execution)
165
+		client.updateNick(currentClient.Nick(), newcfnick, newSkeleton)
164 166
 		return nil
165 167
 	}
166 168
 	// analogous checks for skeletons

Carregando…
Cancelar
Salvar