|
@@ -94,7 +94,7 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
94
|
94
|
* @param token IRCTokenised line to process
|
95
|
95
|
*/
|
96
|
96
|
@Override
|
97
|
|
- public void process(final Date date, final String sParam, final String[] token) {
|
|
97
|
+ public void process(final Date date, final String sParam, final String... token) {
|
98
|
98
|
// Ignore people!
|
99
|
99
|
String sMessage;
|
100
|
100
|
if (token[0].charAt(0) == ':') {
|
|
@@ -121,7 +121,8 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
121
|
121
|
}
|
122
|
122
|
|
123
|
123
|
// Is this actually a notice auth?
|
124
|
|
- if (token[0].indexOf('!') == -1 && token[1].equalsIgnoreCase("NOTICE") && token[2].equalsIgnoreCase("AUTH")) {
|
|
124
|
+ if (token[0].indexOf('!') == -1 && "NOTICE".equalsIgnoreCase(token[1]) &&
|
|
125
|
+ "AUTH".equalsIgnoreCase(token[2])) {
|
125
|
126
|
try {
|
126
|
127
|
parser.getProcessingManager().process(date, "Notice Auth", token);
|
127
|
128
|
} catch (ProcessorNotFoundException e) {
|
|
@@ -129,9 +130,6 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
129
|
130
|
return;
|
130
|
131
|
}
|
131
|
132
|
|
132
|
|
- IRCChannelClientInfo iChannelClient = null;
|
133
|
|
- final IRCChannelInfo iChannel;
|
134
|
|
- final IRCClientInfo iClient;
|
135
|
133
|
// "nick!user@host PRIVMSG #Channel" should be processed as "nick!user@host PRIVMSG #Channel :"
|
136
|
134
|
if (token.length < 4) {
|
137
|
135
|
sMessage = "";
|
|
@@ -139,7 +137,6 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
139
|
137
|
sMessage = token[token.length - 1];
|
140
|
138
|
}
|
141
|
139
|
String[] bits = sMessage.split(" ", 2);
|
142
|
|
- final Character char1 = (char) 1;
|
143
|
140
|
String sCTCP = "";
|
144
|
141
|
boolean isAction = false;
|
145
|
142
|
boolean isCTCP = false;
|
|
@@ -148,7 +145,8 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
148
|
145
|
// Actions are special CTCPs
|
149
|
146
|
// Bits is the message been split into 2 parts
|
150
|
147
|
// the first word and the rest
|
151
|
|
- if (sParam.equalsIgnoreCase("PRIVMSG") && bits[0].equalsIgnoreCase(char1 + "ACTION") && Character.valueOf(sMessage.charAt(sMessage.length() - 1)).equals(char1)) {
|
|
148
|
+ final Character char1 = (char) 1;
|
|
149
|
+ if ("PRIVMSG".equalsIgnoreCase(sParam) && bits[0].equalsIgnoreCase(char1 + "ACTION") && Character.valueOf(sMessage.charAt(sMessage.length() - 1)).equals(char1)) {
|
152
|
150
|
isAction = true;
|
153
|
151
|
if (bits.length > 1) {
|
154
|
152
|
sMessage = bits[1];
|
|
@@ -183,14 +181,17 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
183
|
181
|
}
|
184
|
182
|
|
185
|
183
|
// Remove the leading : from the host.
|
|
184
|
+ final String firstToken;
|
186
|
185
|
if (token[0].charAt(0) == ':' && token[0].length() > 1) {
|
187
|
|
- token[0] = token[0].substring(1);
|
|
186
|
+ firstToken = token[0].substring(1);
|
|
187
|
+ } else {
|
|
188
|
+ firstToken = token[0];
|
188
|
189
|
}
|
189
|
190
|
|
190
|
|
- iClient = getClientInfo(token[0]);
|
|
191
|
+ final IRCClientInfo iClient = getClientInfo(token[0]);
|
191
|
192
|
// Facilitate DMDIRC Formatter
|
192
|
|
- if ((IRCParser.ALWAYS_UPDATECLIENT && iClient != null) && iClient.getHostname().isEmpty()) {
|
193
|
|
- iClient.setUserBits(token[0], false);
|
|
193
|
+ if (IRCParser.ALWAYS_UPDATECLIENT && iClient != null && iClient.getHostname().isEmpty()) {
|
|
194
|
+ iClient.setUserBits(firstToken, false);
|
194
|
195
|
}
|
195
|
196
|
|
196
|
197
|
// Fire the appropriate callbacks.
|
|
@@ -211,77 +212,78 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
211
|
212
|
final String targetName = hasModePrefix ? token[2].substring(1) : token[2];
|
212
|
213
|
|
213
|
214
|
if (isValidChannelName(targetName)) {
|
214
|
|
- iChannel = getChannel(targetName);
|
|
215
|
+ final IRCChannelInfo iChannel = getChannel(targetName);
|
215
|
216
|
if (iChannel == null) {
|
216
|
217
|
// callErrorInfo(new ParserError(ParserError.ERROR_WARNING, "Got message for channel ("+targetName+") that I am not on.", parser.getLastLine()));
|
217
|
218
|
return;
|
218
|
219
|
}
|
|
220
|
+ IRCChannelClientInfo iChannelClient = null;
|
219
|
221
|
if (iClient != null) {
|
220
|
222
|
iChannelClient = iChannel.getChannelClient(iClient);
|
221
|
223
|
}
|
222
|
|
- if (sParam.equalsIgnoreCase("PRIVMSG")) {
|
|
224
|
+ if ("PRIVMSG".equalsIgnoreCase(sParam)) {
|
223
|
225
|
if (isAction) {
|
224
|
|
- callChannelAction(date, iChannel, iChannelClient, sMessage, token[0]);
|
|
226
|
+ callChannelAction(date, iChannel, iChannelClient, sMessage, firstToken);
|
225
|
227
|
} else {
|
226
|
228
|
if (isCTCP) {
|
227
|
|
- callChannelCTCP(date, iChannel, iChannelClient, sCTCP, sMessage, token[0]);
|
|
229
|
+ callChannelCTCP(date, iChannel, iChannelClient, sCTCP, sMessage, firstToken);
|
228
|
230
|
} else if (hasModePrefix) {
|
229
|
|
- callChannelModeMessage(date, modePrefix, iChannel, iChannelClient, sMessage, token[0]);
|
|
231
|
+ callChannelModeMessage(date, modePrefix, iChannel, iChannelClient, sMessage, firstToken);
|
230
|
232
|
} else {
|
231
|
|
- callChannelMessage(date, iChannel, iChannelClient, sMessage, token[0]);
|
|
233
|
+ callChannelMessage(date, iChannel, iChannelClient, sMessage, firstToken);
|
232
|
234
|
}
|
233
|
235
|
}
|
234
|
|
- } else if (sParam.equalsIgnoreCase("NOTICE")) {
|
|
236
|
+ } else if ("NOTICE".equalsIgnoreCase(sParam)) {
|
235
|
237
|
if (isCTCP) {
|
236
|
|
- callChannelCTCPReply(date, iChannel, iChannelClient, sCTCP, sMessage, token[0]);
|
|
238
|
+ callChannelCTCPReply(date, iChannel, iChannelClient, sCTCP, sMessage, firstToken);
|
237
|
239
|
} else if (hasModePrefix) {
|
238
|
|
- callChannelModeNotice(date, modePrefix, iChannel, iChannelClient, sMessage, token[0]);
|
|
240
|
+ callChannelModeNotice(date, modePrefix, iChannel, iChannelClient, sMessage, firstToken);
|
239
|
241
|
} else {
|
240
|
|
- callChannelNotice(date, iChannel, iChannelClient, sMessage, token[0]);
|
|
242
|
+ callChannelNotice(date, iChannel, iChannelClient, sMessage, firstToken);
|
241
|
243
|
}
|
242
|
244
|
}
|
243
|
245
|
} else if (parser.getStringConverter().equalsIgnoreCase(token[2], parser.getMyNickname())) {
|
244
|
|
- if (sParam.equalsIgnoreCase("PRIVMSG")) {
|
|
246
|
+ if ("PRIVMSG".equalsIgnoreCase(sParam)) {
|
245
|
247
|
if (isAction) {
|
246
|
|
- callPrivateAction(date, sMessage, token[0]);
|
|
248
|
+ callPrivateAction(date, sMessage, firstToken);
|
247
|
249
|
} else {
|
248
|
250
|
if (isCTCP) {
|
249
|
|
- callPrivateCTCP(date, sCTCP, sMessage, token[0]);
|
|
251
|
+ callPrivateCTCP(date, sCTCP, sMessage, firstToken);
|
250
|
252
|
} else {
|
251
|
|
- callPrivateMessage(date, sMessage, token[0]);
|
|
253
|
+ callPrivateMessage(date, sMessage, firstToken);
|
252
|
254
|
}
|
253
|
255
|
}
|
254
|
|
- } else if (sParam.equalsIgnoreCase("NOTICE")) {
|
|
256
|
+ } else if ("NOTICE".equalsIgnoreCase(sParam)) {
|
255
|
257
|
if (isCTCP) {
|
256
|
|
- callPrivateCTCPReply(date, sCTCP, sMessage, token[0]);
|
|
258
|
+ callPrivateCTCPReply(date, sCTCP, sMessage, firstToken);
|
257
|
259
|
} else {
|
258
|
|
- if (token[0].indexOf('@') == -1) {
|
259
|
|
- callServerNotice(date, sMessage, token[0]);
|
|
260
|
+ if (firstToken.indexOf('@') == -1) {
|
|
261
|
+ callServerNotice(date, sMessage, firstToken);
|
260
|
262
|
} else {
|
261
|
|
- callPrivateNotice(date, sMessage, token[0]);
|
|
263
|
+ callPrivateNotice(date, sMessage, firstToken);
|
262
|
264
|
}
|
263
|
265
|
}
|
264
|
266
|
}
|
265
|
267
|
} else {
|
266
|
|
- callDebugInfo(IRCParser.DEBUG_INFO, "Message for Other (" + token[2] + ")");
|
267
|
|
- if (sParam.equalsIgnoreCase("PRIVMSG")) {
|
|
268
|
+ callDebugInfo(IRCParser.DEBUG_INFO, "Message for Other (" + token[2] + ')');
|
|
269
|
+ if ("PRIVMSG".equalsIgnoreCase(sParam)) {
|
268
|
270
|
if (isAction) {
|
269
|
|
- callUnknownAction(date, sMessage, token[2], token[0]);
|
|
271
|
+ callUnknownAction(date, sMessage, token[2], firstToken);
|
270
|
272
|
} else {
|
271
|
273
|
if (isCTCP) {
|
272
|
|
- callUnknownCTCP(date, sCTCP, sMessage, token[2], token[0]);
|
|
274
|
+ callUnknownCTCP(date, sCTCP, sMessage, token[2], firstToken);
|
273
|
275
|
} else {
|
274
|
|
- callUnknownMessage(date, sMessage, token[2], token[0]);
|
|
276
|
+ callUnknownMessage(date, sMessage, token[2], firstToken);
|
275
|
277
|
}
|
276
|
278
|
}
|
277
|
|
- } else if (sParam.equalsIgnoreCase("NOTICE")) {
|
|
279
|
+ } else if ("NOTICE".equalsIgnoreCase(sParam)) {
|
278
|
280
|
if (isCTCP) {
|
279
|
|
- callUnknownCTCPReply(date, sCTCP, sMessage, token[2], token[0]);
|
|
281
|
+ callUnknownCTCPReply(date, sCTCP, sMessage, token[2], firstToken);
|
280
|
282
|
} else {
|
281
|
|
- if (token[0].indexOf('@') == -1) {
|
282
|
|
- callUnknownServerNotice(date, sMessage, token[2], token[0]);
|
|
283
|
+ if (firstToken.indexOf('@') == -1) {
|
|
284
|
+ callUnknownServerNotice(date, sMessage, token[2], firstToken);
|
283
|
285
|
} else {
|
284
|
|
- callUnknownNotice(date, sMessage, token[2], token[0]);
|
|
286
|
+ callUnknownNotice(date, sMessage, token[2], firstToken);
|
285
|
287
|
}
|
286
|
288
|
}
|
287
|
289
|
}
|
|
@@ -291,276 +293,276 @@ public class ProcessMessage extends TimestampedIRCProcessor {
|
291
|
293
|
/**
|
292
|
294
|
* Callback to all objects implementing the ChannelAction Callback.
|
293
|
295
|
*
|
294
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelActionListener
|
|
296
|
+ * @see ChannelActionListener
|
295
|
297
|
* @param date The date of this line
|
296
|
298
|
* @param cChannel Channel where the action was sent to
|
297
|
299
|
* @param cChannelClient ChannelClient who sent the action (may be null if server)
|
298
|
300
|
* @param sMessage action contents
|
299
|
301
|
* @param sHost Hostname of sender (or servername)
|
300
|
|
- * @return true if a method was called, false otherwise
|
301
|
302
|
*/
|
302
|
|
- protected boolean callChannelAction(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
303
|
|
- return getCallbackManager().getCallbackType(ChannelActionListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
|
303
|
+ protected void callChannelAction(final Date date, final ChannelInfo cChannel,
|
|
304
|
+ final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
305
|
+ getCallbackManager().getCallbackType(ChannelActionListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
304
|
306
|
}
|
305
|
307
|
|
306
|
308
|
/**
|
307
|
309
|
* Callback to all objects implementing the ChannelCTCP Callback.
|
308
|
310
|
*
|
309
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelCtcpListener
|
|
311
|
+ * @see ChannelCtcpListener
|
310
|
312
|
* @param date The date of this line
|
311
|
313
|
* @param cChannel Channel where CTCP was sent
|
312
|
314
|
* @param cChannelClient ChannelClient who sent the message (may be null if server)
|
313
|
315
|
* @param sType Type of CTCP (VERSION, TIME etc)
|
314
|
316
|
* @param sMessage Additional contents
|
315
|
317
|
* @param sHost Hostname of sender (or servername)
|
316
|
|
- * @return true if a method was called, false otherwise
|
317
|
318
|
*/
|
318
|
|
- protected boolean callChannelCTCP(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
|
319
|
|
- return getCallbackManager().getCallbackType(ChannelCtcpListener.class).call(date, cChannel, cChannelClient, sType, sMessage, sHost);
|
|
319
|
+ protected void callChannelCTCP(final Date date, final ChannelInfo cChannel,
|
|
320
|
+ final ChannelClientInfo cChannelClient, final String sType, final String sMessage,
|
|
321
|
+ final String sHost) {
|
|
322
|
+ getCallbackManager().getCallbackType(ChannelCtcpListener.class).call(date, cChannel, cChannelClient, sType, sMessage, sHost);
|
320
|
323
|
}
|
321
|
324
|
|
322
|
325
|
/**
|
323
|
326
|
* Callback to all objects implementing the ChannelCTCPReply Callback.
|
324
|
327
|
*
|
325
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelCtcpReplyListener
|
|
328
|
+ * @see ChannelCtcpReplyListener
|
326
|
329
|
* @param date The date of this line
|
327
|
330
|
* @param cChannel Channel where CTCPReply was sent
|
328
|
331
|
* @param cChannelClient ChannelClient who sent the message (may be null if server)
|
329
|
332
|
* @param sType Type of CTCPRReply (VERSION, TIME etc)
|
330
|
333
|
* @param sMessage Reply Contents
|
331
|
334
|
* @param sHost Hostname of sender (or servername)
|
332
|
|
- * @return true if a method was called, false otherwise
|
333
|
335
|
*/
|
334
|
|
- protected boolean callChannelCTCPReply(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
|
335
|
|
- return getCallbackManager().getCallbackType(ChannelCtcpReplyListener.class).call(date, cChannel, cChannelClient, sType, sMessage, sHost);
|
|
336
|
+ protected void callChannelCTCPReply(final Date date, final ChannelInfo cChannel,
|
|
337
|
+ final ChannelClientInfo cChannelClient, final String sType, final String sMessage,
|
|
338
|
+ final String sHost) {
|
|
339
|
+ getCallbackManager().getCallbackType(ChannelCtcpReplyListener.class).call(date, cChannel, cChannelClient, sType, sMessage, sHost);
|
336
|
340
|
}
|
337
|
341
|
|
338
|
342
|
/**
|
339
|
343
|
* Callback to all objects implementing the ChannelMessage Callback.
|
340
|
344
|
*
|
341
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelMessageListener
|
|
345
|
+ * @see ChannelMessageListener
|
342
|
346
|
* @param date The date of this line
|
343
|
347
|
* @param cChannel Channel where the message was sent to
|
344
|
348
|
* @param cChannelClient ChannelClient who sent the message (may be null if server)
|
345
|
349
|
* @param sMessage Message contents
|
346
|
350
|
* @param sHost Hostname of sender (or servername)
|
347
|
|
- * @return true if a method was called, false otherwise
|
348
|
351
|
*/
|
349
|
|
- protected boolean callChannelMessage(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
350
|
|
- return getCallbackManager().getCallbackType(ChannelMessageListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
|
352
|
+ protected void callChannelMessage(final Date date, final ChannelInfo cChannel,
|
|
353
|
+ final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
354
|
+ getCallbackManager().getCallbackType(ChannelMessageListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
351
|
355
|
}
|
352
|
356
|
|
353
|
357
|
/**
|
354
|
358
|
* Callback to all objects implementing the ChannelNotice Callback.
|
355
|
359
|
*
|
356
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelNoticeListener
|
|
360
|
+ * @see ChannelNoticeListener
|
357
|
361
|
* @param date The date of this line
|
358
|
362
|
* @param cChannel Channel where the notice was sent to
|
359
|
363
|
* @param cChannelClient ChannelClient who sent the notice (may be null if server)
|
360
|
364
|
* @param sMessage notice contents
|
361
|
365
|
* @param sHost Hostname of sender (or servername)
|
362
|
|
- * @return true if a method was called, false otherwise
|
363
|
366
|
*/
|
364
|
|
- protected boolean callChannelNotice(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
365
|
|
- return getCallbackManager().getCallbackType(ChannelNoticeListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
|
367
|
+ protected void callChannelNotice(final Date date, final ChannelInfo cChannel,
|
|
368
|
+ final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
369
|
+ getCallbackManager().getCallbackType(ChannelNoticeListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
366
|
370
|
}
|
367
|
371
|
|
368
|
372
|
/**
|
369
|
373
|
* Callback to all objects implementing the ChannelModeNotice Callback.
|
370
|
374
|
*
|
371
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelModeNoticeListener
|
|
375
|
+ * @see ChannelModeNoticeListener
|
372
|
376
|
* @param date The date of this line
|
373
|
377
|
* @param prefix Prefix that was used to send this notice.
|
374
|
378
|
* @param cChannel Channel where the notice was sent to
|
375
|
379
|
* @param cChannelClient ChannelClient who sent the notice (may be null if server)
|
376
|
380
|
* @param sMessage notice contents
|
377
|
381
|
* @param sHost Hostname of sender (or servername)
|
378
|
|
- * @return true if a method was called, false otherwise
|
379
|
382
|
*/
|
380
|
|
- protected boolean callChannelModeNotice(final Date date, final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
381
|
|
- return getCallbackManager().getCallbackType(ChannelModeNoticeListener.class).call(date, cChannel, prefix, cChannelClient, sMessage, sHost);
|
|
383
|
+ protected void callChannelModeNotice(final Date date, final char prefix,
|
|
384
|
+ final ChannelInfo cChannel, final ChannelClientInfo cChannelClient,
|
|
385
|
+ final String sMessage, final String sHost) {
|
|
386
|
+ getCallbackManager().getCallbackType(ChannelModeNoticeListener.class).call(date, cChannel, prefix, cChannelClient, sMessage, sHost);
|
382
|
387
|
}
|
383
|
388
|
|
384
|
389
|
/**
|
385
|
390
|
* Callback to all objects implementing the ChannelModeMessage Callback.
|
386
|
391
|
*
|
387
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ChannelModeMessageListener
|
|
392
|
+ * @see ChannelModeMessageListener
|
388
|
393
|
* @param date The date of this line
|
389
|
394
|
* @param prefix Prefix that was used to send this notice.
|
390
|
395
|
* @param cChannel Channel where the notice was sent to
|
391
|
396
|
* @param cChannelClient ChannelClient who sent the notice (may be null if server)
|
392
|
397
|
* @param sMessage message contents
|
393
|
398
|
* @param sHost Hostname of sender (or servername)
|
394
|
|
- * @return true if a method was called, false otherwise
|
395
|
399
|
*/
|
396
|
|
- protected boolean callChannelModeMessage(final Date date, final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
397
|
|
- return getCallbackManager().getCallbackType(ChannelModeMessageListener.class).call(date, cChannel, prefix, cChannelClient, sMessage, sHost);
|
|
400
|
+ protected void callChannelModeMessage(final Date date, final char prefix,
|
|
401
|
+ final ChannelInfo cChannel, final ChannelClientInfo cChannelClient,
|
|
402
|
+ final String sMessage, final String sHost) {
|
|
403
|
+ getCallbackManager().getCallbackType(ChannelModeMessageListener.class).call(date, cChannel, prefix, cChannelClient, sMessage, sHost);
|
398
|
404
|
}
|
399
|
405
|
|
400
|
406
|
/**
|
401
|
407
|
* Callback to all objects implementing the PrivateAction Callback.
|
402
|
408
|
*
|
403
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.PrivateActionListener
|
|
409
|
+ * @see PrivateActionListener
|
404
|
410
|
* @param date The date of this line
|
405
|
411
|
* @param sMessage action contents
|
406
|
412
|
* @param sHost Hostname of sender (or servername)
|
407
|
|
- * @return true if a method was called, false otherwise
|
408
|
413
|
*/
|
409
|
|
- protected boolean callPrivateAction(final Date date, final String sMessage, final String sHost) {
|
410
|
|
- return getCallbackManager().getCallbackType(PrivateActionListener.class).call(date, sMessage, sHost);
|
|
414
|
+ protected void callPrivateAction(final Date date, final String sMessage, final String sHost) {
|
|
415
|
+ getCallbackManager().getCallbackType(PrivateActionListener.class).call(date, sMessage, sHost);
|
411
|
416
|
}
|
412
|
417
|
|
413
|
418
|
/**
|
414
|
419
|
* Callback to all objects implementing the PrivateCTCP Callback.
|
415
|
420
|
*
|
416
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.PrivateCtcpListener
|
|
421
|
+ * @see PrivateCtcpListener
|
417
|
422
|
* @param date The date of this line
|
418
|
423
|
* @param sType Type of CTCP (VERSION, TIME etc)
|
419
|
424
|
* @param sMessage Additional contents
|
420
|
425
|
* @param sHost Hostname of sender (or servername)
|
421
|
|
- * @return true if a method was called, false otherwise
|
422
|
426
|
*/
|
423
|
|
- protected boolean callPrivateCTCP(final Date date, final String sType, final String sMessage, final String sHost) {
|
424
|
|
- return getCallbackManager().getCallbackType(PrivateCtcpListener.class).call(date, sType, sMessage, sHost);
|
|
427
|
+ protected void callPrivateCTCP(final Date date, final String sType, final String sMessage,
|
|
428
|
+ final String sHost) {
|
|
429
|
+ getCallbackManager().getCallbackType(PrivateCtcpListener.class).call(date, sType, sMessage, sHost);
|
425
|
430
|
}
|
426
|
431
|
|
427
|
432
|
/**
|
428
|
433
|
* Callback to all objects implementing the PrivateCTCPReply Callback.
|
429
|
434
|
*
|
430
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.PrivateCtcpReplyListener
|
|
435
|
+ * @see PrivateCtcpReplyListener
|
431
|
436
|
* @param date The date of this line
|
432
|
437
|
* @param sType Type of CTCPRReply (VERSION, TIME etc)
|
433
|
438
|
* @param sMessage Reply Contents
|
434
|
439
|
* @param sHost Hostname of sender (or servername)
|
435
|
|
- * @return true if a method was called, false otherwise
|
436
|
440
|
*/
|
437
|
|
- protected boolean callPrivateCTCPReply(final Date date, final String sType, final String sMessage, final String sHost) {
|
438
|
|
- return getCallbackManager().getCallbackType(PrivateCtcpReplyListener.class).call(date, sType, sMessage, sHost);
|
|
441
|
+ protected void callPrivateCTCPReply(final Date date, final String sType, final String sMessage,
|
|
442
|
+ final String sHost) {
|
|
443
|
+ getCallbackManager().getCallbackType(PrivateCtcpReplyListener.class).call(date, sType, sMessage, sHost);
|
439
|
444
|
}
|
440
|
445
|
|
441
|
446
|
/**
|
442
|
447
|
* Callback to all objects implementing the PrivateMessage Callback.
|
443
|
448
|
*
|
444
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.PrivateMessageListener
|
|
449
|
+ * @see PrivateMessageListener
|
445
|
450
|
* @param date The date of this line
|
446
|
451
|
* @param sMessage Message contents
|
447
|
452
|
* @param sHost Hostname of sender (or servername)
|
448
|
|
- * @return true if a method was called, false otherwise
|
449
|
453
|
*/
|
450
|
|
- protected boolean callPrivateMessage(final Date date, final String sMessage, final String sHost) {
|
451
|
|
- return getCallbackManager().getCallbackType(PrivateMessageListener.class).call(date, sMessage, sHost);
|
|
454
|
+ protected void callPrivateMessage(final Date date, final String sMessage, final String sHost) {
|
|
455
|
+ getCallbackManager().getCallbackType(PrivateMessageListener.class).call(date, sMessage, sHost);
|
452
|
456
|
}
|
453
|
457
|
|
454
|
458
|
/**
|
455
|
459
|
* Callback to all objects implementing the PrivateNotice Callback.
|
456
|
460
|
*
|
457
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.PrivateNoticeListener
|
|
461
|
+ * @see PrivateNoticeListener
|
458
|
462
|
* @param date The date of this line
|
459
|
463
|
* @param sMessage Notice contents
|
460
|
464
|
* @param sHost Hostname of sender (or servername)
|
461
|
|
- * @return true if a method was called, false otherwise
|
462
|
465
|
*/
|
463
|
|
- protected boolean callPrivateNotice(final Date date, final String sMessage, final String sHost) {
|
464
|
|
- return getCallbackManager().getCallbackType(PrivateNoticeListener.class).call(date, sMessage, sHost);
|
|
466
|
+ protected void callPrivateNotice(final Date date, final String sMessage, final String sHost) {
|
|
467
|
+ getCallbackManager().getCallbackType(PrivateNoticeListener.class).call(date, sMessage, sHost);
|
465
|
468
|
}
|
466
|
469
|
|
467
|
470
|
/**
|
468
|
471
|
* Callback to all objects implementing the ServerNotice Callback.
|
469
|
472
|
*
|
470
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.ServerNoticeListener
|
|
473
|
+ * @see ServerNoticeListener
|
471
|
474
|
* @param date The date of this line
|
472
|
475
|
* @param sMessage Notice contents
|
473
|
476
|
* @param sHost Hostname of sender (or servername)
|
474
|
|
- * @return true if a method was called, false otherwise
|
475
|
477
|
*/
|
476
|
|
- protected boolean callServerNotice(final Date date, final String sMessage, final String sHost) {
|
477
|
|
- return getCallbackManager().getCallbackType(ServerNoticeListener.class).call(date, sMessage, sHost);
|
|
478
|
+ protected void callServerNotice(final Date date, final String sMessage, final String sHost) {
|
|
479
|
+ getCallbackManager().getCallbackType(ServerNoticeListener.class).call(date, sMessage, sHost);
|
478
|
480
|
}
|
479
|
481
|
|
480
|
482
|
/**
|
481
|
483
|
* Callback to all objects implementing the UnknownAction Callback.
|
482
|
484
|
*
|
483
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.UnknownActionListener
|
|
485
|
+ * @see UnknownActionListener
|
484
|
486
|
* @param date The date of this line
|
485
|
487
|
* @param sMessage Action contents
|
486
|
488
|
* @param sTarget Actual target of action
|
487
|
489
|
* @param sHost Hostname of sender (or servername)
|
488
|
|
- * @return true if a method was called, false otherwise
|
489
|
490
|
*/
|
490
|
|
- protected boolean callUnknownAction(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
491
|
|
- return getCallbackManager().getCallbackType(UnknownActionListener.class).call(date, sMessage, sTarget, sHost);
|
|
491
|
+ protected void callUnknownAction(final Date date, final String sMessage, final String sTarget,
|
|
492
|
+ final String sHost) {
|
|
493
|
+ getCallbackManager().getCallbackType(UnknownActionListener.class).call(date, sMessage, sTarget, sHost);
|
492
|
494
|
}
|
493
|
495
|
|
494
|
496
|
/**
|
495
|
497
|
* Callback to all objects implementing the UnknownCTCP Callback.
|
496
|
498
|
*
|
497
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.UnknownCtcpListener
|
|
499
|
+ * @see UnknownCtcpListener
|
498
|
500
|
* @param date The date of this line
|
499
|
501
|
* @param sType Type of CTCP (VERSION, TIME etc)
|
500
|
502
|
* @param sMessage Additional contents
|
501
|
503
|
* @param sTarget Actual Target of CTCP
|
502
|
504
|
* @param sHost Hostname of sender (or servername)
|
503
|
|
- * @return true if a method was called, false otherwise
|
504
|
505
|
*/
|
505
|
|
- protected boolean callUnknownCTCP(final Date date, final String sType, final String sMessage, final String sTarget, final String sHost) {
|
506
|
|
- return getCallbackManager().getCallbackType(UnknownCtcpListener.class).call(date, sType, sMessage, sTarget, sHost);
|
|
506
|
+ protected void callUnknownCTCP(final Date date, final String sType, final String sMessage,
|
|
507
|
+ final String sTarget, final String sHost) {
|
|
508
|
+ getCallbackManager().getCallbackType(UnknownCtcpListener.class).call(date, sType, sMessage, sTarget, sHost);
|
507
|
509
|
}
|
508
|
510
|
|
509
|
511
|
/**
|
510
|
512
|
* Callback to all objects implementing the UnknownCTCPReply Callback.
|
511
|
513
|
*
|
512
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.UnknownCtcpReplyListener
|
|
514
|
+ * @see UnknownCtcpReplyListener
|
513
|
515
|
* @param date The date of this line
|
514
|
516
|
* @param sType Type of CTCPRReply (VERSION, TIME etc)
|
515
|
517
|
* @param sMessage Reply Contents
|
516
|
518
|
* @param sTarget Actual Target of CTCPReply
|
517
|
519
|
* @param sHost Hostname of sender (or servername)
|
518
|
|
- * @return true if a method was called, false otherwise
|
519
|
520
|
*/
|
520
|
|
- protected boolean callUnknownCTCPReply(final Date date, final String sType, final String sMessage, final String sTarget, final String sHost) {
|
521
|
|
- return getCallbackManager().getCallbackType(UnknownCtcpReplyListener.class).call(date, sType, sMessage, sTarget, sHost);
|
|
521
|
+ protected void callUnknownCTCPReply(final Date date, final String sType, final String sMessage,
|
|
522
|
+ final String sTarget, final String sHost) {
|
|
523
|
+ getCallbackManager().getCallbackType(UnknownCtcpReplyListener.class).call(date, sType, sMessage, sTarget, sHost);
|
522
|
524
|
}
|
523
|
525
|
|
524
|
526
|
/**
|
525
|
527
|
* Callback to all objects implementing the UnknownMessage Callback.
|
526
|
528
|
*
|
527
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.UnknownMessageListener
|
|
529
|
+ * @see UnknownMessageListener
|
528
|
530
|
* @param date The date of this line
|
529
|
531
|
* @param sMessage Message contents
|
530
|
532
|
* @param sTarget Actual target of message
|
531
|
533
|
* @param sHost Hostname of sender (or servername)
|
532
|
|
- * @return true if a method was called, false otherwise
|
533
|
534
|
*/
|
534
|
|
- protected boolean callUnknownMessage(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
535
|
|
- return getCallbackManager().getCallbackType(UnknownMessageListener.class).call(date, sMessage, sTarget, sHost);
|
|
535
|
+ protected void callUnknownMessage(final Date date, final String sMessage, final String sTarget,
|
|
536
|
+ final String sHost) {
|
|
537
|
+ getCallbackManager().getCallbackType(UnknownMessageListener.class).call(date, sMessage, sTarget, sHost);
|
536
|
538
|
}
|
537
|
539
|
|
538
|
540
|
/**
|
539
|
541
|
* Callback to all objects implementing the UnknownNotice Callback.
|
540
|
542
|
*
|
541
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.UnknownNoticeListener
|
|
543
|
+ * @see UnknownNoticeListener
|
542
|
544
|
* @param date The date of this line
|
543
|
545
|
* @param sMessage Notice contents
|
544
|
546
|
* @param sTarget Actual target of notice
|
545
|
547
|
* @param sHost Hostname of sender (or servername)
|
546
|
|
- * @return true if a method was called, false otherwise
|
547
|
548
|
*/
|
548
|
|
- protected boolean callUnknownNotice(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
549
|
|
- return getCallbackManager().getCallbackType(UnknownNoticeListener.class).call(date, sMessage, sTarget, sHost);
|
|
549
|
+ protected void callUnknownNotice(final Date date, final String sMessage, final String sTarget,
|
|
550
|
+ final String sHost) {
|
|
551
|
+ getCallbackManager().getCallbackType(UnknownNoticeListener.class).call(date, sMessage, sTarget, sHost);
|
550
|
552
|
}
|
551
|
553
|
|
552
|
554
|
/**
|
553
|
555
|
* Callback to all objects implementing the UnknownNotice Callback.
|
554
|
556
|
*
|
555
|
|
- * @see com.dmdirc.parser.interfaces.callbacks.UnknownServerNoticeListener
|
|
557
|
+ * @see UnknownServerNoticeListener
|
556
|
558
|
* @param date The date of this line
|
557
|
559
|
* @param sMessage Notice contents
|
558
|
560
|
* @param sTarget Actual target of notice
|
559
|
561
|
* @param sHost Hostname of sender (or servername)
|
560
|
|
- * @return true if a method was called, false otherwise
|
561
|
562
|
*/
|
562
|
|
- protected boolean callUnknownServerNotice(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
563
|
|
- return getCallbackManager().getCallbackType(UnknownServerNoticeListener.class).call(date, sMessage, sTarget, sHost);
|
|
563
|
+ protected void callUnknownServerNotice(final Date date, final String sMessage,
|
|
564
|
+ final String sTarget, final String sHost) {
|
|
565
|
+ getCallbackManager().getCallbackType(UnknownServerNoticeListener.class).call(date, sMessage, sTarget, sHost);
|
564
|
566
|
}
|
565
|
567
|
|
566
|
568
|
/**
|