|
@@ -27,6 +27,7 @@ import java.beans.PropertyVetoException;
|
27
|
27
|
import java.lang.reflect.InvocationTargetException;
|
28
|
28
|
import java.net.URL;
|
29
|
29
|
import java.util.ArrayList;
|
|
30
|
+import java.util.HashMap;
|
30
|
31
|
|
31
|
32
|
import javax.swing.ImageIcon;
|
32
|
33
|
import javax.swing.JInternalFrame;
|
|
@@ -376,6 +377,16 @@ public final class Channel implements IChannelMessage, IChannelGotNames,
|
376
|
377
|
return frame.equals(target);
|
377
|
378
|
}
|
378
|
379
|
|
|
380
|
+ /**
|
|
381
|
+ * Ensures that a channel client's map is set up correctly.
|
|
382
|
+ * @param target The ChannelClientInfo to check
|
|
383
|
+ */
|
|
384
|
+ private void mapClient(final ChannelClientInfo target) {
|
|
385
|
+ if (target.getMiscObject() == null) {
|
|
386
|
+ target.setMiscObject(new HashMap<ChannelClientProperty, Object>());
|
|
387
|
+ }
|
|
388
|
+ }
|
|
389
|
+
|
379
|
390
|
/**
|
380
|
391
|
* Called whenever a message is sent to this channel. NB that the ChannelClient
|
381
|
392
|
* passed may be null if the message was not sent by a client on the channel
|
|
@@ -441,6 +452,7 @@ public final class Channel implements IChannelMessage, IChannelGotNames,
|
441
|
452
|
|
442
|
453
|
final ArrayList<String> names = new ArrayList<String>();
|
443
|
454
|
for (ChannelClientInfo channelClient : cChannel.getChannelClients()) {
|
|
455
|
+ mapClient(channelClient);
|
444
|
456
|
names.add(channelClient.getNickname());
|
445
|
457
|
}
|
446
|
458
|
tabCompleter.replaceEntries(names);
|
|
@@ -494,6 +506,8 @@ public final class Channel implements IChannelMessage, IChannelGotNames,
|
494
|
506
|
|
495
|
507
|
final StringBuffer buff = new StringBuffer("channelJoin");
|
496
|
508
|
|
|
509
|
+ mapClient(cChannelClient);
|
|
510
|
+
|
497
|
511
|
ActionManager.processEvent(CoreActionType.CHANNEL_JOIN, buff, this, cChannelClient);
|
498
|
512
|
|
499
|
513
|
frame.addLine(buff, "", client.getNickname(), client.getIdent(),
|