thoj/go-ircevent — pull request #50 by tyler-sommer (2014-11-05 23:22:00+00:00)
Title: Fixed NICK callback updating currentnick

This PR fixes the NICK callback responsible for updating `currentnick`.

`e.Nick` is the old nickname, and `e.Arguments[0]` is the new nick. In `Nick(n string)` we set `nick` to the new nick, so the new nick `nick` can never equal the old nickname `e.Nick`. This PR corrects this check.

Note: The test was covering this feature was failing and is still failing. It looks like there may be a race condition between setting currentnick in one callback and reading currentnick in the next callback. I verified this works independent of `go test`.