|
@@ -123,21 +123,27 @@ public class Process004005 extends IRCProcessor {
|
123
|
123
|
int i = multiParam ? 4 : 1;
|
124
|
124
|
final String[] bits = multiParam ? token : token[3].split(" ");
|
125
|
125
|
|
126
|
|
- parser.h005Info.put("004IRCD", bits[i++]);
|
|
126
|
+ if (bits.length > i) {
|
|
127
|
+ parser.h005Info.put("004IRCD", bits[i]);
|
|
128
|
+ i++;
|
|
129
|
+ }
|
127
|
130
|
|
128
|
|
- if (bits[i].matches("^\\d+$")) {
|
|
131
|
+ if (bits.length > i && bits[i].matches("^\\d+$")) {
|
129
|
132
|
// some IRCDs put a timestamp where the usermodes should be
|
130
|
133
|
// (issues 4140. 4181 and 4183) so check to see if this is
|
131
|
134
|
// numeric only, and if so, skip it.
|
132
|
135
|
i++;
|
133
|
136
|
}
|
134
|
137
|
|
135
|
|
- parser.h005Info.put("USERMODES", bits[i++]);
|
136
|
|
- parser.h005Info.put("USERCHANMODES", bits[i++]);
|
|
138
|
+ if (bits.length > i + 1) {
|
|
139
|
+ parser.h005Info.put("USERMODES", bits[i]);
|
|
140
|
+ parser.h005Info.put("USERCHANMODES", bits[i + 1]);
|
|
141
|
+ i += 2;
|
|
142
|
+ }
|
137
|
143
|
|
138
|
144
|
if (bits.length > i) {
|
139
|
145
|
// INSPIRCD includes an extra param
|
140
|
|
- parser.h005Info.put("USERCHANPARAMMODES", bits[i++]);
|
|
146
|
+ parser.h005Info.put("USERCHANPARAMMODES", bits[i]);
|
141
|
147
|
}
|
142
|
148
|
|
143
|
149
|
parser.parseUserModes();
|