raisedragon / pircbotx

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

Channel Mode Setting: Not all mode parameters passed into setMode #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

It seems that when the RPL_CHANNELMODEIS event is being processed, not all 
relevant information is passed into channel.setMode(). In case of a channel 
limit ('l') it expects a next parameter with an integer value for the limit, 
however only the mode flags are ever passed into setMode.

I have included a one-liner ugly fix, but I guess you'll want to fix it up 
proper. I have tried to do so, but Eclipse is being really annoying because of 
the @Getter and @Setter annotations from Lombok. :-P

In case you want to reproduce:
* join channel #debian on irc.freenode.net
    This channel has set a limit and because of that you get into the control flow where the next parameter is requested from the interator, automatically assuming that it's not null.

I don't have a stack trace of the exception at hand but it happens at: 
InputParser.java:168 (from memory) and it seems to be caused by the fact that 
Channel.setMode does not get all subsequent parameters, only the set of mode 
flags.

Thanks for continuing this library.

Original issue reported on code.google.com by danny.va...@gmail.com on 10 Nov 2013 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
Turns out that 324 mode responses were not covered in the unit tests so this 
fell through the cracks. Fixed the issue and added/updated multiple unit tests 
in Revision f12b1a9619ef

SNAPSHOT should be built soon with a 2.0.1 release planned

Original comment by Lord.Qua...@gmail.com on 15 Nov 2013 at 8:00