raisedragon / pircbotx

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

getRegisteredAs() returning null on first use for given user #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I call getRegisteredAs() on a WhoisEvent, as long as I have not sent a 
/whois to them before the current one, it will return a null string (logging it 
literally returns "null"). However, after that, it returns properly.

Original issue reported on code.google.com by MandL...@gmail.com on 16 Feb 2015 at 10:28

GoogleCodeExporter commented 9 years ago
I confirm this issue as well with v2.0.1

Original comment by alexande...@gmail.com on 18 Mar 2015 at 5:31

GoogleCodeExporter commented 9 years ago
I also tried it with 2.1-SNAPSHOT and UnrealIRCD and it seems that it doesn't 
return anything (not null though)

Original comment by alexande...@gmail.com on 18 Mar 2015 at 5:51

GoogleCodeExporter commented 9 years ago
Yes this was fixed in 2.1. If WHOIS returns something like this

330 PircBotXUser OtherUser nickservAccount :is logged in as

Then getRegisteredAs() will return "nickservAccount". But if we get something 
like these

330 PircBotXUser OtherUser :is logged in as
307 PircBotXUser OtherUser :has identified for this nick

Then getRegisteredAs() will return an empty string as the server doesn't tell 
us what their nickserv name is. 

With 2.1 do you get this behavior?

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

GoogleCodeExporter commented 9 years ago
I've tried to clarify this in the javadoc in  Revision 115f065919ab

Original comment by Lord.Qua...@gmail.com on 5 Apr 2015 at 1:00

GoogleCodeExporter commented 9 years ago

Original comment by Lord.Qua...@gmail.com on 11 Apr 2015 at 4:37