Menu

Patch from July 2009

Help
2010-01-12
2013-04-25
  • Nobody/Anonymous

    I was having a problem using jmirc to connect to WebMaster ConferenceRoom 4.x, and discovered the reason was a bug in your Utils.trim() code assuming that the string being passed in is not zero length. In the case of ConferenceRoom, it can send a blank line back to the IRC client, and so this was getting passed into trim() and failing.

    I was going to check in my patch, but then I see someone else supplied the same exact patch back in July 2009…

    One other StringIndexOutOfBoundsException() that I found was in the handling code for '333' commands, in the Listener class. It assumes that the user given in the 333 command will have an exclamation point (!) as part of the description, but ConferenceRoom IRC server often sends just the nickname of the person that set the topic. So my re-written version handles this:

                        case 333:  // RPL_TOPICWHOTIME
                            String topicwho = "Topic set by '";
                                                    int topic = command[3].indexOf('!');
                                                    if (topic != -1)
                                                    {
                                                         topicwho += command[3].substring(0, topic);
                                                    }
                                                    else
                                                    {
                                                        topicwho += command[3];
                                                    }
                                                    
                            topicwho += "' on " + Utils.formatDateMillis(Long.parseLong(cmdline[2])*1000);
                            uihandler.getChannel(command[2]).writeInfo(topicwho);
                            break;
    
     
  • Juho Vähä-Herttua

    Thank you very much, this is included in the development version now.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.