node-irc
node-irc copied to clipboard
Fix user modes updating
The user modes inside "channel.users" structure was not being updated. The comparison wasn't returning the expected value, so I changed it a little. Now the user modes are being updated successfuly.
I'm not too fond of if (typeof channel.users[user] !== 'undefined') these kinds of checks, false is not undefined but it doesn't hold and value to be replaced either.
checking for its length, though, does seem safe enough: if it has length, it has things inside.
This was rewritten in PR #351 and now functions correctly as far as I can tell.