Track the client's nick changes

Do we want to keep the nick they've changed to? Most clients' permanent
nick setup is different from temporary /nicking
On 18 Dec 2014 21:39, "Nick Desaulniers" <notifications@github.com> wrote:

> In js/my.js
> <https://github.com/nickdesaulniers/fxos-irc/pull/84#discussion-diff-22073491>
> :
>
> > @@ -217,6 +219,14 @@ document.addEventListener("DOMContentLoaded", function () {
> >                });
> >            }
> >        });
> > +      client.addListener('nick', function(oldNick, newNick, channels, message) {
> > +          if (oldNick.toLowerCase() === username.toLowerCase()) {
> > +              username = newNick;
> > +          }
> > +      });
> > +      client.addListener('registered', function(message) {
> > +          username = message.args[0];
>
> Every time we assign to username, we should also write it back to
> localstorage, here and above. Maybe a helper function would be nicer, but
> is not necessary.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nickdesaulniers/fxos-irc/pull/84/files#r22073491>.
>