false assumption in IRCConnection.java:4
Status: Beta
Brought to you by:
snoopdave
in IRCConnection.java in the handling of a NOTICE, an
assumption is made that there are more then 4 tokens in
the ParseToken[] token instance:
(Line 448 and on)
String text = message.substring( tokens[4].index ).trim();
try {
handled = true;
if (text.substring(0,9).equals(":\001VERSION")) {
_mux.onVersionNotice(orgnick,origin,text.substring(9));
}
else {
_mux.onNotice(text);
In effect there are 4 tokens thus throwing an exception
when handling this
I solved it (crudely) with:
int tl = 0;
if (tokens.length > 4) tl = 4;
else tl = tokens.length - 1;
String text = message.substring( tokens[tl].index ).trim();
Logged In: YES
user_id=247039
Actually, the real solution is to change the 4 to a 3, so
the line that generates the exception reads:
String text = message.substring( tokens[3].index ).trim
();
In the RFC, as well as every NOTICE message I've seen, the
text begins in the 4th token. Even the version response
specifically coded here returns
source NOTICE usernick :\001VERSION .......\001