Read nickname from RPL_WELCOME

References: https://github.com/ircdocs/modern-irc/pull/146
This commit is contained in:
Simon Ser 2021-12-06 17:55:47 +01:00
parent 05f7c6e9fe
commit 305f510501

View file

@ -272,6 +272,7 @@ export default class Client extends EventTarget {
if (msg.prefix) { if (msg.prefix) {
this.serverPrefix = msg.prefix; this.serverPrefix = msg.prefix;
} }
this.nick = msg.params[0];
console.log("Registration complete"); console.log("Registration complete");
this.setStatus(Client.Status.REGISTERED); this.setStatus(Client.Status.REGISTERED);