|
@@ -174,8 +174,7 @@ public class ServerEventHandler extends EventHandler implements
|
174
|
174
|
final String message, final String host) {
|
175
|
175
|
checkParser(parser);
|
176
|
176
|
|
177
|
|
- owner.doNotification("privateCTCP", CoreActionType.SERVER_CTCP,
|
178
|
|
- owner.getParser().getClient(host), type, message);
|
|
177
|
+ owner.doNotification("privateCTCP", owner.getParser().getClient(host), type, message);
|
179
|
178
|
if (triggerAction("privateCTCP", CoreActionType.SERVER_CTCP, owner.getParser().getClient(
|
180
|
179
|
host), type, message)) {
|
181
|
180
|
owner.sendCTCPReply(owner.parseHostmask(host)[0], type, message);
|
|
@@ -187,8 +186,7 @@ public class ServerEventHandler extends EventHandler implements
|
187
|
186
|
final String message, final String host) {
|
188
|
187
|
checkParser(parser);
|
189
|
188
|
|
190
|
|
- owner.doNotification("privateCTCPreply", CoreActionType.SERVER_CTCPR,
|
191
|
|
- owner.getParser().getClient(host), type, message);
|
|
189
|
+ owner.doNotification("privateCTCPreply", owner.getParser().getClient(host), type, message);
|
192
|
190
|
triggerAction("privateCTCPreply", CoreActionType.SERVER_CTCPR, owner.getParser().getClient(
|
193
|
191
|
host), type, message);
|
194
|
192
|
}
|
|
@@ -205,8 +203,7 @@ public class ServerEventHandler extends EventHandler implements
|
205
|
203
|
final String message, final String host) {
|
206
|
204
|
checkParser(parser);
|
207
|
205
|
|
208
|
|
- owner.doNotification("privateNotice", CoreActionType.SERVER_NOTICE,
|
209
|
|
- owner.getParser().getClient(host), message);
|
|
206
|
+ owner.doNotification("privateNotice", owner.getParser().getClient(host), message);
|
210
|
207
|
triggerAction("privateNotice", CoreActionType.SERVER_NOTICE, owner.getParser().getClient(
|
211
|
208
|
host), message);
|
212
|
209
|
}
|
|
@@ -216,8 +213,7 @@ public class ServerEventHandler extends EventHandler implements
|
216
|
213
|
final String message, final String host) {
|
217
|
214
|
checkParser(parser);
|
218
|
215
|
|
219
|
|
- owner.doNotification("serverNotice", CoreActionType.SERVER_SERVERNOTICE,
|
220
|
|
- owner.getParser().getClient(host), message);
|
|
216
|
+ owner.doNotification("serverNotice", owner.getParser().getClient(host), message);
|
221
|
217
|
triggerAction("serverNotice", CoreActionType.SERVER_SERVERNOTICE, owner.getParser().
|
222
|
218
|
getClient(host), message);
|
223
|
219
|
}
|
|
@@ -226,7 +222,7 @@ public class ServerEventHandler extends EventHandler implements
|
226
|
222
|
public void onMOTDStart(final Parser parser, final Date date, final String data) {
|
227
|
223
|
checkParser(parser);
|
228
|
224
|
|
229
|
|
- owner.doNotification("motdStart", CoreActionType.SERVER_MOTDSTART, data);
|
|
225
|
+ owner.doNotification("motdStart", data);
|
230
|
226
|
triggerAction("motdStart", CoreActionType.SERVER_MOTDSTART, data);
|
231
|
227
|
}
|
232
|
228
|
|
|
@@ -234,7 +230,7 @@ public class ServerEventHandler extends EventHandler implements
|
234
|
230
|
public void onMOTDLine(final Parser parser, final Date date, final String data) {
|
235
|
231
|
checkParser(parser);
|
236
|
232
|
|
237
|
|
- owner.doNotification("motdLine", CoreActionType.SERVER_MOTDLINE, data);
|
|
233
|
+ owner.doNotification("motdLine", data);
|
238
|
234
|
triggerAction("motdLine", CoreActionType.SERVER_MOTDLINE, data);
|
239
|
235
|
}
|
240
|
236
|
|
|
@@ -243,7 +239,7 @@ public class ServerEventHandler extends EventHandler implements
|
243
|
239
|
final boolean noMOTD, final String data) {
|
244
|
240
|
checkParser(parser);
|
245
|
241
|
|
246
|
|
- owner.doNotification("motdEnd", CoreActionType.SERVER_MOTDEND, data);
|
|
242
|
+ owner.doNotification("motdEnd", data);
|
247
|
243
|
triggerAction("motdEnd", CoreActionType.SERVER_MOTDEND, data);
|
248
|
244
|
}
|
249
|
245
|
|
|
@@ -290,10 +286,10 @@ public class ServerEventHandler extends EventHandler implements
|
290
|
286
|
}
|
291
|
287
|
|
292
|
288
|
if (currentState == AwayState.AWAY) {
|
293
|
|
- owner.doNotification("away", CoreActionType.SERVER_AWAY, reason);
|
|
289
|
+ owner.doNotification("away", reason);
|
294
|
290
|
triggerAction("away", CoreActionType.SERVER_AWAY, reason);
|
295
|
291
|
} else {
|
296
|
|
- owner.doNotification("back", CoreActionType.SERVER_BACK);
|
|
292
|
+ owner.doNotification("back");
|
297
|
293
|
triggerAction("back", CoreActionType.SERVER_BACK);
|
298
|
294
|
}
|
299
|
295
|
}
|
|
@@ -320,7 +316,7 @@ public class ServerEventHandler extends EventHandler implements
|
320
|
316
|
public void onNoticeAuth(final Parser parser, final Date date, final String data) {
|
321
|
317
|
checkParser(parser);
|
322
|
318
|
|
323
|
|
- owner.doNotification("authNotice", CoreActionType.SERVER_AUTHNOTICE, data);
|
|
319
|
+ owner.doNotification("authNotice", data);
|
324
|
320
|
triggerAction("authNotice", CoreActionType.SERVER_AUTHNOTICE, data);
|
325
|
321
|
}
|
326
|
322
|
|
|
@@ -329,8 +325,7 @@ public class ServerEventHandler extends EventHandler implements
|
329
|
325
|
final String target, final String host) {
|
330
|
326
|
checkParser(parser);
|
331
|
327
|
|
332
|
|
- owner.doNotification("unknownNotice", CoreActionType.SERVER_UNKNOWNNOTICE,
|
333
|
|
- host, target, message);
|
|
328
|
+ owner.doNotification("unknownNotice", host, target, message);
|
334
|
329
|
triggerAction("unknownNotice", CoreActionType.SERVER_UNKNOWNNOTICE, host, target, message);
|
335
|
330
|
}
|
336
|
331
|
|
|
@@ -342,12 +337,11 @@ public class ServerEventHandler extends EventHandler implements
|
342
|
337
|
if (parser.getLocalClient().equals(parser.getClient(host))) {
|
343
|
338
|
// Local client
|
344
|
339
|
owner.getQuery(target).doNotification("querySelfExternalMessage",
|
345
|
|
- CoreActionType.QUERY_SELF_MESSAGE, parser.getLocalClient(), message);
|
|
340
|
+ parser.getLocalClient(), message);
|
346
|
341
|
triggerAction("querySelfExternalMessage", CoreActionType.QUERY_SELF_MESSAGE, parser.
|
347
|
342
|
getLocalClient(), message);
|
348
|
343
|
} else {
|
349
|
|
- owner.doNotification("unknownMessage", CoreActionType.SERVER_UNKNOWNNOTICE,
|
350
|
|
- host, target, message);
|
|
344
|
+ owner.doNotification("unknownMessage", host, target, message);
|
351
|
345
|
triggerAction("unknownMessage", CoreActionType.SERVER_UNKNOWNNOTICE, host, target,
|
352
|
346
|
message);
|
353
|
347
|
}
|
|
@@ -361,11 +355,10 @@ public class ServerEventHandler extends EventHandler implements
|
361
|
355
|
if (parser.getLocalClient().equals(parser.getClient(host))) {
|
362
|
356
|
// Local client
|
363
|
357
|
owner.getQuery(target).doNotification("querySelfExternalAction",
|
364
|
|
- CoreActionType.QUERY_SELF_ACTION, parser.getLocalClient(), message);
|
|
358
|
+ parser.getLocalClient(), message);
|
365
|
359
|
triggerAction("querySelfExternalAction", CoreActionType.QUERY_SELF_ACTION, message);
|
366
|
360
|
} else {
|
367
|
|
- owner.doNotification("unknownAction", CoreActionType.SERVER_UNKNOWNACTION,
|
368
|
|
- host, target, message);
|
|
361
|
+ owner.doNotification("unknownAction", host, target, message);
|
369
|
362
|
triggerAction("unknownAction", CoreActionType.SERVER_UNKNOWNACTION, host, target,
|
370
|
363
|
message);
|
371
|
364
|
}
|
|
@@ -376,8 +369,7 @@ public class ServerEventHandler extends EventHandler implements
|
376
|
369
|
final ClientInfo client, final String host, final String modes) {
|
377
|
370
|
checkParser(parser);
|
378
|
371
|
|
379
|
|
- owner.doNotification("userModeChanged", CoreActionType.SERVER_USERMODES,
|
380
|
|
- owner.getParser().getClient(host), modes);
|
|
372
|
+ owner.doNotification("userModeChanged", owner.getParser().getClient(host), modes);
|
381
|
373
|
triggerAction("userModeChanged", CoreActionType.SERVER_USERMODES, owner.getParser().
|
382
|
374
|
getClient(host), modes);
|
383
|
375
|
}
|
|
@@ -388,8 +380,7 @@ public class ServerEventHandler extends EventHandler implements
|
388
|
380
|
checkParser(parser);
|
389
|
381
|
|
390
|
382
|
owner.doNotification(modes.isEmpty() || "+".equals(modes)
|
391
|
|
- ? "userNoModes" : "userModeDiscovered",
|
392
|
|
- CoreActionType.SERVER_USERMODES, client, modes);
|
|
383
|
+ ? "userNoModes" : "userModeDiscovered", client, modes);
|
393
|
384
|
triggerAction(modes.isEmpty() || "+".equals(modes) ? "userNoModes" : "userModeDiscovered",
|
394
|
385
|
CoreActionType.SERVER_USERMODES, client, modes);
|
395
|
386
|
}
|
|
@@ -401,7 +392,6 @@ public class ServerEventHandler extends EventHandler implements
|
401
|
392
|
|
402
|
393
|
owner.addInvite(new Invite(owner, channel, userHost));
|
403
|
394
|
owner.doNotification("inviteReceived",
|
404
|
|
- CoreActionType.SERVER_INVITERECEIVED,
|
405
|
395
|
owner.getParser().getClient(userHost), channel);
|
406
|
396
|
triggerAction("inviteReceived", CoreActionType.SERVER_INVITERECEIVED, owner.getParser().
|
407
|
397
|
getClient(userHost), channel);
|
|
@@ -412,8 +402,7 @@ public class ServerEventHandler extends EventHandler implements
|
412
|
402
|
final String host) {
|
413
|
403
|
checkParser(parser);
|
414
|
404
|
|
415
|
|
- owner.doNotification("wallop", CoreActionType.SERVER_WALLOPS,
|
416
|
|
- owner.getParser().getClient(host), message);
|
|
405
|
+ owner.doNotification("wallop", owner.getParser().getClient(host), message);
|
417
|
406
|
triggerAction("wallop", CoreActionType.SERVER_WALLOPS, owner.getParser().getClient(host),
|
418
|
407
|
message);
|
419
|
408
|
|
|
@@ -424,8 +413,7 @@ public class ServerEventHandler extends EventHandler implements
|
424
|
413
|
final String host) {
|
425
|
414
|
checkParser(parser);
|
426
|
415
|
|
427
|
|
- owner.doNotification("walluser", CoreActionType.SERVER_WALLUSERS,
|
428
|
|
- owner.getParser().getClient(host), message);
|
|
416
|
+ owner.doNotification("walluser", owner.getParser().getClient(host), message);
|
429
|
417
|
triggerAction("walluser", CoreActionType.SERVER_WALLUSERS, owner.getParser().getClient(host),
|
430
|
418
|
message);
|
431
|
419
|
}
|
|
@@ -435,8 +423,7 @@ public class ServerEventHandler extends EventHandler implements
|
435
|
423
|
final String host) {
|
436
|
424
|
checkParser(parser);
|
437
|
425
|
|
438
|
|
- owner.doNotification("walldesync", CoreActionType.SERVER_WALLDESYNC,
|
439
|
|
- owner.getParser().getClient(host), message);
|
|
426
|
+ owner.doNotification("walldesync", owner.getParser().getClient(host), message);
|
440
|
427
|
triggerAction("walldesync", CoreActionType.SERVER_WALLDESYNC, owner.getParser().getClient(
|
441
|
428
|
host), message);
|
442
|
429
|
}
|
|
@@ -447,8 +434,7 @@ public class ServerEventHandler extends EventHandler implements
|
447
|
434
|
checkParser(parser);
|
448
|
435
|
|
449
|
436
|
if (client.equals(owner.getParser().getLocalClient())) {
|
450
|
|
- owner.doNotification("selfNickChange", CoreActionType.SERVER_NICKCHANGE,
|
451
|
|
- oldNick, client.getNickname());
|
|
437
|
+ owner.doNotification("selfNickChange", oldNick, client.getNickname());
|
452
|
438
|
triggerAction("selfNickChange", CoreActionType.SERVER_NICKCHANGE, oldNick, client.
|
453
|
439
|
getNickname());
|
454
|
440
|
owner.updateTitle();
|
|
@@ -459,7 +445,7 @@ public class ServerEventHandler extends EventHandler implements
|
459
|
445
|
public void onServerError(final Parser parser, final Date date, final String message) {
|
460
|
446
|
checkParser(parser);
|
461
|
447
|
|
462
|
|
- owner.doNotification("serverError", CoreActionType.SERVER_ERROR, message);
|
|
448
|
+ owner.doNotification("serverError", message);
|
463
|
449
|
triggerAction("serverError", CoreActionType.SERVER_ERROR, message);
|
464
|
450
|
}
|
465
|
451
|
|