|
@@ -45,6 +45,7 @@ import com.dmdirc.parser.interfaces.callbacks.UnknownMessageListener;
|
45
|
45
|
import com.dmdirc.parser.interfaces.callbacks.UnknownNoticeListener;
|
46
|
46
|
import com.dmdirc.parser.interfaces.callbacks.UnknownServerNoticeListener;
|
47
|
47
|
|
|
48
|
+import java.util.Date;
|
48
|
49
|
import java.util.regex.PatternSyntaxException;
|
49
|
50
|
|
50
|
51
|
/**
|
|
@@ -55,7 +56,7 @@ import java.util.regex.PatternSyntaxException;
|
55
|
56
|
* Actions are handled here aswell separately from CTCPs.<br>
|
56
|
57
|
* Each type has 5 Calls, making 15 callbacks handled here.
|
57
|
58
|
*/
|
58
|
|
-public class ProcessMessage extends IRCProcessor {
|
|
59
|
+public class ProcessMessage extends TimestampedIRCProcessor {
|
59
|
60
|
|
60
|
61
|
/**
|
61
|
62
|
* Create a new instance of the IRCProcessor Object.
|
|
@@ -79,7 +80,7 @@ public class ProcessMessage extends IRCProcessor {
|
79
|
80
|
* @param token IRCTokenised line to process
|
80
|
81
|
*/
|
81
|
82
|
@Override
|
82
|
|
- public void process(final String sParam, final String[] token) {
|
|
83
|
+ public void process(final Date date, final String sParam, final String[] token) {
|
83
|
84
|
// Ignore people!
|
84
|
85
|
String sMessage = "";
|
85
|
86
|
if (token[0].charAt(0) == ':') {
|
|
@@ -108,7 +109,7 @@ public class ProcessMessage extends IRCProcessor {
|
108
|
109
|
// Is this actually a notice auth?
|
109
|
110
|
if (token[0].indexOf('!') == -1 && token[1].equalsIgnoreCase("NOTICE") && token[2].equalsIgnoreCase("AUTH")) {
|
110
|
111
|
try {
|
111
|
|
- parser.getProcessingManager().process("Notice Auth", token);
|
|
112
|
+ parser.getProcessingManager().process(date, "Notice Auth", token);
|
112
|
113
|
} catch (ProcessorNotFoundException e) {
|
113
|
114
|
}
|
114
|
115
|
return;
|
|
@@ -133,9 +134,7 @@ public class ProcessMessage extends IRCProcessor {
|
133
|
134
|
// Actions are special CTCPs
|
134
|
135
|
// Bits is the message been split into 2 parts
|
135
|
136
|
// the first word and the rest
|
136
|
|
- if (sParam.equalsIgnoreCase("PRIVMSG") && bits[0].equalsIgnoreCase(
|
137
|
|
- char1 + "ACTION") && Character.valueOf(sMessage.charAt(
|
138
|
|
- sMessage.length() - 1)).equals(char1)) {
|
|
137
|
+ if (sParam.equalsIgnoreCase("PRIVMSG") && bits[0].equalsIgnoreCase(char1 + "ACTION") && Character.valueOf(sMessage.charAt(sMessage.length() - 1)).equals(char1)) {
|
139
|
138
|
isAction = true;
|
140
|
139
|
if (bits.length > 1) {
|
141
|
140
|
sMessage = bits[1];
|
|
@@ -146,8 +145,7 @@ public class ProcessMessage extends IRCProcessor {
|
146
|
145
|
}
|
147
|
146
|
// If the message is not an action, check if it is another type of CTCP
|
148
|
147
|
// CTCPs have Character(1) at the start/end of the line
|
149
|
|
- if (!isAction && Character.valueOf(sMessage.charAt(0)).equals(char1)
|
150
|
|
- && Character.valueOf(sMessage.charAt(sMessage.length() - 1)).equals(char1)) {
|
|
148
|
+ if (!isAction && Character.valueOf(sMessage.charAt(0)).equals(char1) && Character.valueOf(sMessage.charAt(sMessage.length() - 1)).equals(char1)) {
|
151
|
149
|
isCTCP = true;
|
152
|
150
|
// Bits is the message been split into 2 parts, the first word and the rest
|
153
|
151
|
// Some CTCPs have messages and some do not
|
|
@@ -209,44 +207,44 @@ public class ProcessMessage extends IRCProcessor {
|
209
|
207
|
}
|
210
|
208
|
if (sParam.equalsIgnoreCase("PRIVMSG")) {
|
211
|
209
|
if (isAction) {
|
212
|
|
- callChannelAction(iChannel, iChannelClient, sMessage, token[0]);
|
|
210
|
+ callChannelAction(date, iChannel, iChannelClient, sMessage, token[0]);
|
213
|
211
|
} else {
|
214
|
212
|
if (isCTCP) {
|
215
|
|
- callChannelCTCP(iChannel, iChannelClient, sCTCP, sMessage, token[0]);
|
|
213
|
+ callChannelCTCP(date, iChannel, iChannelClient, sCTCP, sMessage, token[0]);
|
216
|
214
|
} else if (hasModePrefix) {
|
217
|
|
- callChannelModeMessage(modePrefix, iChannel, iChannelClient, sMessage, token[0]);
|
|
215
|
+ callChannelModeMessage(date, modePrefix, iChannel, iChannelClient, sMessage, token[0]);
|
218
|
216
|
} else {
|
219
|
|
- callChannelMessage(iChannel, iChannelClient, sMessage, token[0]);
|
|
217
|
+ callChannelMessage(date, iChannel, iChannelClient, sMessage, token[0]);
|
220
|
218
|
}
|
221
|
219
|
}
|
222
|
220
|
} else if (sParam.equalsIgnoreCase("NOTICE")) {
|
223
|
221
|
if (isCTCP) {
|
224
|
|
- callChannelCTCPReply(iChannel, iChannelClient, sCTCP, sMessage, token[0]);
|
|
222
|
+ callChannelCTCPReply(date, iChannel, iChannelClient, sCTCP, sMessage, token[0]);
|
225
|
223
|
} else if (hasModePrefix) {
|
226
|
|
- callChannelModeNotice(modePrefix, iChannel, iChannelClient, sMessage, token[0]);
|
|
224
|
+ callChannelModeNotice(date, modePrefix, iChannel, iChannelClient, sMessage, token[0]);
|
227
|
225
|
} else {
|
228
|
|
- callChannelNotice(iChannel, iChannelClient, sMessage, token[0]);
|
|
226
|
+ callChannelNotice(date, iChannel, iChannelClient, sMessage, token[0]);
|
229
|
227
|
}
|
230
|
228
|
}
|
231
|
229
|
} else if (parser.getStringConverter().equalsIgnoreCase(token[2], parser.getMyNickname())) {
|
232
|
230
|
if (sParam.equalsIgnoreCase("PRIVMSG")) {
|
233
|
231
|
if (isAction) {
|
234
|
|
- callPrivateAction(sMessage, token[0]);
|
|
232
|
+ callPrivateAction(date, sMessage, token[0]);
|
235
|
233
|
} else {
|
236
|
234
|
if (isCTCP) {
|
237
|
|
- callPrivateCTCP(sCTCP, sMessage, token[0]);
|
|
235
|
+ callPrivateCTCP(date, sCTCP, sMessage, token[0]);
|
238
|
236
|
} else {
|
239
|
|
- callPrivateMessage(sMessage, token[0]);
|
|
237
|
+ callPrivateMessage(date, sMessage, token[0]);
|
240
|
238
|
}
|
241
|
239
|
}
|
242
|
240
|
} else if (sParam.equalsIgnoreCase("NOTICE")) {
|
243
|
241
|
if (isCTCP) {
|
244
|
|
- callPrivateCTCPReply(sCTCP, sMessage, token[0]);
|
|
242
|
+ callPrivateCTCPReply(date, sCTCP, sMessage, token[0]);
|
245
|
243
|
} else {
|
246
|
244
|
if (token[0].indexOf('@') == -1) {
|
247
|
|
- callServerNotice(sMessage, token[0]);
|
|
245
|
+ callServerNotice(date, sMessage, token[0]);
|
248
|
246
|
} else {
|
249
|
|
- callPrivateNotice(sMessage, token[0]);
|
|
247
|
+ callPrivateNotice(date, sMessage, token[0]);
|
250
|
248
|
}
|
251
|
249
|
}
|
252
|
250
|
}
|
|
@@ -254,22 +252,22 @@ public class ProcessMessage extends IRCProcessor {
|
254
|
252
|
callDebugInfo(IRCParser.DEBUG_INFO, "Message for Other (" + token[2] + ")");
|
255
|
253
|
if (sParam.equalsIgnoreCase("PRIVMSG")) {
|
256
|
254
|
if (isAction) {
|
257
|
|
- callUnknownAction(sMessage, token[2], token[0]);
|
|
255
|
+ callUnknownAction(date, sMessage, token[2], token[0]);
|
258
|
256
|
} else {
|
259
|
257
|
if (isCTCP) {
|
260
|
|
- callUnknownCTCP(sCTCP, sMessage, token[2], token[0]);
|
|
258
|
+ callUnknownCTCP(date, sCTCP, sMessage, token[2], token[0]);
|
261
|
259
|
} else {
|
262
|
|
- callUnknownMessage(sMessage, token[2], token[0]);
|
|
260
|
+ callUnknownMessage(date, sMessage, token[2], token[0]);
|
263
|
261
|
}
|
264
|
262
|
}
|
265
|
263
|
} else if (sParam.equalsIgnoreCase("NOTICE")) {
|
266
|
264
|
if (isCTCP) {
|
267
|
|
- callUnknownCTCPReply(sCTCP, sMessage, token[2], token[0]);
|
|
265
|
+ callUnknownCTCPReply(date, sCTCP, sMessage, token[2], token[0]);
|
268
|
266
|
} else {
|
269
|
267
|
if (token[0].indexOf('@') == -1) {
|
270
|
|
- callUnknownServerNotice(sMessage, token[2], token[0]);
|
|
268
|
+ callUnknownServerNotice(date, sMessage, token[2], token[0]);
|
271
|
269
|
} else {
|
272
|
|
- callUnknownNotice(sMessage, token[2], token[0]);
|
|
270
|
+ callUnknownNotice(date, sMessage, token[2], token[0]);
|
273
|
271
|
}
|
274
|
272
|
}
|
275
|
273
|
}
|
|
@@ -280,20 +278,22 @@ public class ProcessMessage extends IRCProcessor {
|
280
|
278
|
* Callback to all objects implementing the ChannelAction Callback.
|
281
|
279
|
*
|
282
|
280
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelAction
|
|
281
|
+ * @param date The date of this line
|
283
|
282
|
* @param cChannel Channel where the action was sent to
|
284
|
283
|
* @param cChannelClient ChannelClient who sent the action (may be null if server)
|
285
|
284
|
* @param sMessage action contents
|
286
|
285
|
* @param sHost Hostname of sender (or servername)
|
287
|
286
|
* @return true if a method was called, false otherwise
|
288
|
287
|
*/
|
289
|
|
- protected boolean callChannelAction(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
290
|
|
- return getCallbackManager().getCallbackType(ChannelActionListener.class).call(cChannel, cChannelClient, sMessage, sHost);
|
|
288
|
+ protected boolean callChannelAction(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
289
|
+ return getCallbackManager().getCallbackType(ChannelActionListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
291
|
290
|
}
|
292
|
291
|
|
293
|
292
|
/**
|
294
|
293
|
* Callback to all objects implementing the ChannelCTCP Callback.
|
295
|
294
|
*
|
296
|
295
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelCTCP
|
|
296
|
+ * @param date The date of this line
|
297
|
297
|
* @param cChannel Channel where CTCP was sent
|
298
|
298
|
* @param cChannelClient ChannelClient who sent the message (may be null if server)
|
299
|
299
|
* @param sType Type of CTCP (VERSION, TIME etc)
|
|
@@ -301,14 +301,15 @@ public class ProcessMessage extends IRCProcessor {
|
301
|
301
|
* @param sHost Hostname of sender (or servername)
|
302
|
302
|
* @return true if a method was called, false otherwise
|
303
|
303
|
*/
|
304
|
|
- protected boolean callChannelCTCP(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
|
305
|
|
- return getCallbackManager().getCallbackType(ChannelCtcpListener.class).call(cChannel, cChannelClient, sType, sMessage, sHost);
|
|
304
|
+ protected boolean callChannelCTCP(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
|
|
305
|
+ return getCallbackManager().getCallbackType(ChannelCtcpListener.class).call(date, cChannel, cChannelClient, sType, sMessage, sHost);
|
306
|
306
|
}
|
307
|
307
|
|
308
|
308
|
/**
|
309
|
309
|
* Callback to all objects implementing the ChannelCTCPReply Callback.
|
310
|
310
|
*
|
311
|
311
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelCTCPReply
|
|
312
|
+ * @param date The date of this line
|
312
|
313
|
* @param cChannel Channel where CTCPReply was sent
|
313
|
314
|
* @param cChannelClient ChannelClient who sent the message (may be null if server)
|
314
|
315
|
* @param sType Type of CTCPRReply (VERSION, TIME etc)
|
|
@@ -316,42 +317,45 @@ public class ProcessMessage extends IRCProcessor {
|
316
|
317
|
* @param sHost Hostname of sender (or servername)
|
317
|
318
|
* @return true if a method was called, false otherwise
|
318
|
319
|
*/
|
319
|
|
- protected boolean callChannelCTCPReply(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
|
320
|
|
- return getCallbackManager().getCallbackType(ChannelCtcpReplyListener.class).call(cChannel, cChannelClient, sType, sMessage, sHost);
|
|
320
|
+ protected boolean callChannelCTCPReply(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) {
|
|
321
|
+ return getCallbackManager().getCallbackType(ChannelCtcpReplyListener.class).call(date, cChannel, cChannelClient, sType, sMessage, sHost);
|
321
|
322
|
}
|
322
|
323
|
|
323
|
324
|
/**
|
324
|
325
|
* Callback to all objects implementing the ChannelMessage Callback.
|
325
|
326
|
*
|
326
|
327
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelMessage
|
|
328
|
+ * @param date The date of this line
|
327
|
329
|
* @param cChannel Channel where the message was sent to
|
328
|
330
|
* @param cChannelClient ChannelClient who sent the message (may be null if server)
|
329
|
331
|
* @param sMessage Message contents
|
330
|
332
|
* @param sHost Hostname of sender (or servername)
|
331
|
333
|
* @return true if a method was called, false otherwise
|
332
|
334
|
*/
|
333
|
|
- protected boolean callChannelMessage(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
334
|
|
- return getCallbackManager().getCallbackType(ChannelMessageListener.class).call(cChannel, cChannelClient, sMessage, sHost);
|
|
335
|
+ protected boolean callChannelMessage(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
336
|
+ return getCallbackManager().getCallbackType(ChannelMessageListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
335
|
337
|
}
|
336
|
338
|
|
337
|
339
|
/**
|
338
|
340
|
* Callback to all objects implementing the ChannelNotice Callback.
|
339
|
341
|
*
|
340
|
342
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelNotice
|
|
343
|
+ * @param date The date of this line
|
341
|
344
|
* @param cChannel Channel where the notice was sent to
|
342
|
345
|
* @param cChannelClient ChannelClient who sent the notice (may be null if server)
|
343
|
346
|
* @param sMessage notice contents
|
344
|
347
|
* @param sHost Hostname of sender (or servername)
|
345
|
348
|
* @return true if a method was called, false otherwise
|
346
|
349
|
*/
|
347
|
|
- protected boolean callChannelNotice(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
348
|
|
- return getCallbackManager().getCallbackType(ChannelNoticeListener.class).call(cChannel, cChannelClient, sMessage, sHost);
|
|
350
|
+ protected boolean callChannelNotice(final Date date, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
351
|
+ return getCallbackManager().getCallbackType(ChannelNoticeListener.class).call(date, cChannel, cChannelClient, sMessage, sHost);
|
349
|
352
|
}
|
350
|
353
|
|
351
|
354
|
/**
|
352
|
355
|
* Callback to all objects implementing the ChannelModeNotice Callback.
|
353
|
356
|
*
|
354
|
357
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelModeNotice
|
|
358
|
+ * @param date The date of this line
|
355
|
359
|
* @param prefix Prefix that was used to send this notice.
|
356
|
360
|
* @param cChannel Channel where the notice was sent to
|
357
|
361
|
* @param cChannelClient ChannelClient who sent the notice (may be null if server)
|
|
@@ -359,14 +363,15 @@ public class ProcessMessage extends IRCProcessor {
|
359
|
363
|
* @param sHost Hostname of sender (or servername)
|
360
|
364
|
* @return true if a method was called, false otherwise
|
361
|
365
|
*/
|
362
|
|
- protected boolean callChannelModeNotice(final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
363
|
|
- return getCallbackManager().getCallbackType(ChannelModeNoticeListener.class).call(cChannel, prefix, cChannelClient, sMessage, sHost);
|
|
366
|
+ protected boolean callChannelModeNotice(final Date date, final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
367
|
+ return getCallbackManager().getCallbackType(ChannelModeNoticeListener.class).call(date, cChannel, prefix, cChannelClient, sMessage, sHost);
|
364
|
368
|
}
|
365
|
369
|
|
366
|
370
|
/**
|
367
|
371
|
* Callback to all objects implementing the ChannelModeMessage Callback.
|
368
|
372
|
*
|
369
|
373
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IChannelModeMessage
|
|
374
|
+ * @param date The date of this line
|
370
|
375
|
* @param prefix Prefix that was used to send this notice.
|
371
|
376
|
* @param cChannel Channel where the notice was sent to
|
372
|
377
|
* @param cChannelClient ChannelClient who sent the notice (may be null if server)
|
|
@@ -374,162 +379,174 @@ public class ProcessMessage extends IRCProcessor {
|
374
|
379
|
* @param sHost Hostname of sender (or servername)
|
375
|
380
|
* @return true if a method was called, false otherwise
|
376
|
381
|
*/
|
377
|
|
- protected boolean callChannelModeMessage(final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
378
|
|
- return getCallbackManager().getCallbackType(ChannelModeMessageListener.class).call(cChannel, prefix, cChannelClient, sMessage, sHost);
|
|
382
|
+ protected boolean callChannelModeMessage(final Date date, final char prefix, final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sMessage, final String sHost) {
|
|
383
|
+ return getCallbackManager().getCallbackType(ChannelModeMessageListener.class).call(date, cChannel, prefix, cChannelClient, sMessage, sHost);
|
379
|
384
|
}
|
380
|
385
|
|
381
|
386
|
/**
|
382
|
387
|
* Callback to all objects implementing the PrivateAction Callback.
|
383
|
388
|
*
|
384
|
389
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IPrivateAction
|
|
390
|
+ * @param date The date of this line
|
385
|
391
|
* @param sMessage action contents
|
386
|
392
|
* @param sHost Hostname of sender (or servername)
|
387
|
393
|
* @return true if a method was called, false otherwise
|
388
|
394
|
*/
|
389
|
|
- protected boolean callPrivateAction(final String sMessage, final String sHost) {
|
390
|
|
- return getCallbackManager().getCallbackType(PrivateActionListener.class).call(sMessage, sHost);
|
|
395
|
+ protected boolean callPrivateAction(final Date date, final String sMessage, final String sHost) {
|
|
396
|
+ return getCallbackManager().getCallbackType(PrivateActionListener.class).call(date, sMessage, sHost);
|
391
|
397
|
}
|
392
|
398
|
|
393
|
399
|
/**
|
394
|
400
|
* Callback to all objects implementing the PrivateCTCP Callback.
|
395
|
401
|
*
|
396
|
402
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IPrivateCTCP
|
|
403
|
+ * @param date The date of this line
|
397
|
404
|
* @param sType Type of CTCP (VERSION, TIME etc)
|
398
|
405
|
* @param sMessage Additional contents
|
399
|
406
|
* @param sHost Hostname of sender (or servername)
|
400
|
407
|
* @return true if a method was called, false otherwise
|
401
|
408
|
*/
|
402
|
|
- protected boolean callPrivateCTCP(final String sType, final String sMessage, final String sHost) {
|
403
|
|
- return getCallbackManager().getCallbackType(PrivateCtcpListener.class).call(sType, sMessage, sHost);
|
|
409
|
+ protected boolean callPrivateCTCP(final Date date, final String sType, final String sMessage, final String sHost) {
|
|
410
|
+ return getCallbackManager().getCallbackType(PrivateCtcpListener.class).call(date, sType, sMessage, sHost);
|
404
|
411
|
}
|
405
|
412
|
|
406
|
413
|
/**
|
407
|
414
|
* Callback to all objects implementing the PrivateCTCPReply Callback.
|
408
|
415
|
*
|
409
|
416
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IPrivateCTCPReply
|
|
417
|
+ * @param date The date of this line
|
410
|
418
|
* @param sType Type of CTCPRReply (VERSION, TIME etc)
|
411
|
419
|
* @param sMessage Reply Contents
|
412
|
420
|
* @param sHost Hostname of sender (or servername)
|
413
|
421
|
* @return true if a method was called, false otherwise
|
414
|
422
|
*/
|
415
|
|
- protected boolean callPrivateCTCPReply(final String sType, final String sMessage, final String sHost) {
|
416
|
|
- return getCallbackManager().getCallbackType(PrivateCtcpReplyListener.class).call(sType, sMessage, sHost);
|
|
423
|
+ protected boolean callPrivateCTCPReply(final Date date, final String sType, final String sMessage, final String sHost) {
|
|
424
|
+ return getCallbackManager().getCallbackType(PrivateCtcpReplyListener.class).call(date, sType, sMessage, sHost);
|
417
|
425
|
}
|
418
|
426
|
|
419
|
427
|
/**
|
420
|
428
|
* Callback to all objects implementing the PrivateMessage Callback.
|
421
|
429
|
*
|
422
|
430
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IPrivateMessage
|
|
431
|
+ * @param date The date of this line
|
423
|
432
|
* @param sMessage Message contents
|
424
|
433
|
* @param sHost Hostname of sender (or servername)
|
425
|
434
|
* @return true if a method was called, false otherwise
|
426
|
435
|
*/
|
427
|
|
- protected boolean callPrivateMessage(final String sMessage, final String sHost) {
|
428
|
|
- return getCallbackManager().getCallbackType(PrivateMessageListener.class).call(sMessage, sHost);
|
|
436
|
+ protected boolean callPrivateMessage(final Date date, final String sMessage, final String sHost) {
|
|
437
|
+ return getCallbackManager().getCallbackType(PrivateMessageListener.class).call(date, sMessage, sHost);
|
429
|
438
|
}
|
430
|
439
|
|
431
|
440
|
/**
|
432
|
441
|
* Callback to all objects implementing the PrivateNotice Callback.
|
433
|
442
|
*
|
434
|
443
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IPrivateNotice
|
|
444
|
+ * @param date The date of this line
|
435
|
445
|
* @param sMessage Notice contents
|
436
|
446
|
* @param sHost Hostname of sender (or servername)
|
437
|
447
|
* @return true if a method was called, false otherwise
|
438
|
448
|
*/
|
439
|
|
- protected boolean callPrivateNotice(final String sMessage, final String sHost) {
|
440
|
|
- return getCallbackManager().getCallbackType(PrivateNoticeListener.class).call(sMessage, sHost);
|
|
449
|
+ protected boolean callPrivateNotice(final Date date, final String sMessage, final String sHost) {
|
|
450
|
+ return getCallbackManager().getCallbackType(PrivateNoticeListener.class).call(date, sMessage, sHost);
|
441
|
451
|
}
|
442
|
452
|
|
443
|
453
|
/**
|
444
|
454
|
* Callback to all objects implementing the ServerNotice Callback.
|
445
|
455
|
*
|
446
|
456
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.ServerNotice
|
|
457
|
+ * @param date The date of this line
|
447
|
458
|
* @param sMessage Notice contents
|
448
|
459
|
* @param sHost Hostname of sender (or servername)
|
449
|
460
|
* @return true if a method was called, false otherwise
|
450
|
461
|
*/
|
451
|
|
- protected boolean callServerNotice(final String sMessage, final String sHost) {
|
452
|
|
- return getCallbackManager().getCallbackType(ServerNoticeListener.class).call(sMessage, sHost);
|
|
462
|
+ protected boolean callServerNotice(final Date date, final String sMessage, final String sHost) {
|
|
463
|
+ return getCallbackManager().getCallbackType(ServerNoticeListener.class).call(date, sMessage, sHost);
|
453
|
464
|
}
|
454
|
465
|
|
455
|
466
|
/**
|
456
|
467
|
* Callback to all objects implementing the UnknownAction Callback.
|
457
|
468
|
*
|
458
|
469
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IUnknownAction
|
|
470
|
+ * @param date The date of this line
|
459
|
471
|
* @param sMessage Action contents
|
460
|
472
|
* @param sTarget Actual target of action
|
461
|
473
|
* @param sHost Hostname of sender (or servername)
|
462
|
474
|
* @return true if a method was called, false otherwise
|
463
|
475
|
*/
|
464
|
|
- protected boolean callUnknownAction(final String sMessage, final String sTarget, final String sHost) {
|
465
|
|
- return getCallbackManager().getCallbackType(UnknownActionListener.class).call(sMessage, sTarget, sHost);
|
|
476
|
+ protected boolean callUnknownAction(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
|
477
|
+ return getCallbackManager().getCallbackType(UnknownActionListener.class).call(date, sMessage, sTarget, sHost);
|
466
|
478
|
}
|
467
|
479
|
|
468
|
480
|
/**
|
469
|
481
|
* Callback to all objects implementing the UnknownCTCP Callback.
|
470
|
482
|
*
|
471
|
483
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IUnknownCTCP
|
|
484
|
+ * @param date The date of this line
|
472
|
485
|
* @param sType Type of CTCP (VERSION, TIME etc)
|
473
|
486
|
* @param sMessage Additional contents
|
474
|
487
|
* @param sTarget Actual Target of CTCP
|
475
|
488
|
* @param sHost Hostname of sender (or servername)
|
476
|
489
|
* @return true if a method was called, false otherwise
|
477
|
490
|
*/
|
478
|
|
- protected boolean callUnknownCTCP(final String sType, final String sMessage, final String sTarget, final String sHost) {
|
479
|
|
- return getCallbackManager().getCallbackType(UnknownCtcpListener.class).call(sType, sMessage, sTarget, sHost);
|
|
491
|
+ protected boolean callUnknownCTCP(final Date date, final String sType, final String sMessage, final String sTarget, final String sHost) {
|
|
492
|
+ return getCallbackManager().getCallbackType(UnknownCtcpListener.class).call(date, sType, sMessage, sTarget, sHost);
|
480
|
493
|
}
|
481
|
494
|
|
482
|
495
|
/**
|
483
|
496
|
* Callback to all objects implementing the UnknownCTCPReply Callback.
|
484
|
497
|
*
|
485
|
498
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IUnknownCTCPReply
|
|
499
|
+ * @param date The date of this line
|
486
|
500
|
* @param sType Type of CTCPRReply (VERSION, TIME etc)
|
487
|
501
|
* @param sMessage Reply Contents
|
488
|
502
|
* @param sTarget Actual Target of CTCPReply
|
489
|
503
|
* @param sHost Hostname of sender (or servername)
|
490
|
504
|
* @return true if a method was called, false otherwise
|
491
|
505
|
*/
|
492
|
|
- protected boolean callUnknownCTCPReply(final String sType, final String sMessage, final String sTarget, final String sHost) {
|
493
|
|
- return getCallbackManager().getCallbackType(UnknownCtcpReplyListener.class).call(sType, sMessage, sTarget, sHost);
|
|
506
|
+ protected boolean callUnknownCTCPReply(final Date date, final String sType, final String sMessage, final String sTarget, final String sHost) {
|
|
507
|
+ return getCallbackManager().getCallbackType(UnknownCtcpReplyListener.class).call(date, sType, sMessage, sTarget, sHost);
|
494
|
508
|
}
|
495
|
509
|
|
496
|
510
|
/**
|
497
|
511
|
* Callback to all objects implementing the UnknownMessage Callback.
|
498
|
512
|
*
|
499
|
513
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IUnknownMessage
|
|
514
|
+ * @param date The date of this line
|
500
|
515
|
* @param sMessage Message contents
|
501
|
516
|
* @param sTarget Actual target of message
|
502
|
517
|
* @param sHost Hostname of sender (or servername)
|
503
|
518
|
* @return true if a method was called, false otherwise
|
504
|
519
|
*/
|
505
|
|
- protected boolean callUnknownMessage(final String sMessage, final String sTarget, final String sHost) {
|
506
|
|
- return getCallbackManager().getCallbackType(UnknownMessageListener.class).call(sMessage, sTarget, sHost);
|
|
520
|
+ protected boolean callUnknownMessage(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
|
521
|
+ return getCallbackManager().getCallbackType(UnknownMessageListener.class).call(date, sMessage, sTarget, sHost);
|
507
|
522
|
}
|
508
|
523
|
|
509
|
524
|
/**
|
510
|
525
|
* Callback to all objects implementing the UnknownNotice Callback.
|
511
|
526
|
*
|
512
|
527
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IUnknownNotice
|
|
528
|
+ * @param date The date of this line
|
513
|
529
|
* @param sMessage Notice contents
|
514
|
530
|
* @param sTarget Actual target of notice
|
515
|
531
|
* @param sHost Hostname of sender (or servername)
|
516
|
532
|
* @return true if a method was called, false otherwise
|
517
|
533
|
*/
|
518
|
|
- protected boolean callUnknownNotice(final String sMessage, final String sTarget, final String sHost) {
|
519
|
|
- return getCallbackManager().getCallbackType(UnknownNoticeListener.class).call(sMessage, sTarget, sHost);
|
|
534
|
+ protected boolean callUnknownNotice(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
|
535
|
+ return getCallbackManager().getCallbackType(UnknownNoticeListener.class).call(date, sMessage, sTarget, sHost);
|
520
|
536
|
}
|
521
|
537
|
|
522
|
538
|
/**
|
523
|
539
|
* Callback to all objects implementing the UnknownNotice Callback.
|
524
|
540
|
*
|
525
|
541
|
* @see com.dmdirc.parser.irc.callbacks.interfaces.IUnknownNotice
|
|
542
|
+ * @param date The date of this line
|
526
|
543
|
* @param sMessage Notice contents
|
527
|
544
|
* @param sTarget Actual target of notice
|
528
|
545
|
* @param sHost Hostname of sender (or servername)
|
529
|
546
|
* @return true if a method was called, false otherwise
|
530
|
547
|
*/
|
531
|
|
- protected boolean callUnknownServerNotice(final String sMessage, final String sTarget, final String sHost) {
|
532
|
|
- return getCallbackManager().getCallbackType(UnknownServerNoticeListener.class).call(sMessage, sTarget, sHost);
|
|
548
|
+ protected boolean callUnknownServerNotice(final Date date, final String sMessage, final String sTarget, final String sHost) {
|
|
549
|
+ return getCallbackManager().getCallbackType(UnknownServerNoticeListener.class).call(date, sMessage, sTarget, sHost);
|
533
|
550
|
}
|
534
|
551
|
|
535
|
552
|
/**
|