raisedragon / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

Channel.getNormalUsers() returns duplicated users #235

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to ix.undernet.org or irc.freenode.com using other IRCClient using 
nick: userA
2. Let this client create any new channel, i.e.: channelA => userA is the owner 
of channelA
3. Pircbotx joins channelA using nick: userB
4. userA parts channelA
5. userA joins back to channelA
6. Pircbotx's ListenerAdapter's onJoin method detects userA joins channelA
7. Do a Channel.getNormalUsers() call in onJoin() method.

What is the expected output? What do you see instead?
Expected: userA, userB( or just userB, either way is fine depending on the 
server's policy)
Instead: @userA, userA, userB

What version of the product are you using? On what operating system?
2.1. But I suspect that 2.0.1 would produce the same bug.

Please provide any additional information below.
Channel.getUsers() and Channel.getNormalUsers() are quite confusing right now. 
I myself would expect:
i) getUsers(): returns all users including privilege annotation prefix. But 
would it be better of just plain users' nicks? Since you have getOwner(), 
getOps()... for that matter already.
ii) getNormalUsers(): returns all users without special privilege.
iii) getUsersNick(): returns the nicks of all users, right now is buggy as well 
(returns: @userA, userA, userB)

If its the servers' issue and Pircbotx's design is fine. Could you provide a 
fix to overcome this?
Thanks.

Original issue reported on code.google.com by function...@gmail.com on 27 Feb 2015 at 9:56

GoogleCodeExporter commented 9 years ago
Sorry, that was from the newly added NAMES parsing which didn't account for 
opped/voiced/etc users that have symbols in their name. Fixed in Revision 
0960b8f186f2

With your last paragraph, I think this bug confused you. getUsersNicks() will 
return just the plain nicks without any symbols. getUsers() has always returned 
the User object so you can get more information. 

Original comment by Lord.Qua...@gmail.com on 5 Apr 2015 at 12:20