|
@@ -45,6 +45,7 @@ import com.dmdirc.events.ChannelTopicChangeEvent;
|
45
|
45
|
import com.dmdirc.events.QueryClosedEvent;
|
46
|
46
|
import com.dmdirc.events.QueryOpenedEvent;
|
47
|
47
|
import com.dmdirc.events.UserErrorEvent;
|
|
48
|
+import com.dmdirc.interfaces.GroupChatUser;
|
48
|
49
|
import com.dmdirc.interfaces.PrivateChat;
|
49
|
50
|
import com.dmdirc.interfaces.User;
|
50
|
51
|
import com.dmdirc.interfaces.config.AggregateConfigProvider;
|
|
@@ -548,6 +549,17 @@ public class LoggingManager implements ConfigChangeListener {
|
548
|
549
|
return getDisplayName(channelClient, "");
|
549
|
550
|
}
|
550
|
551
|
|
|
552
|
+ /**
|
|
553
|
+ * Get name to display for channelClient (Taking into account the channelmodeprefix setting).
|
|
554
|
+ *
|
|
555
|
+ * @param channelClient The client to get the display name for
|
|
556
|
+ *
|
|
557
|
+ * @return name to display
|
|
558
|
+ */
|
|
559
|
+ protected String getDisplayName(final GroupChatUser channelClient) {
|
|
560
|
+ return getDisplayName(channelClient, "");
|
|
561
|
+ }
|
|
562
|
+
|
551
|
563
|
/**
|
552
|
564
|
* Get name to display for channelClient (Taking into account the channelmodeprefix setting).
|
553
|
565
|
*
|
|
@@ -568,6 +580,25 @@ public class LoggingManager implements ConfigChangeListener {
|
568
|
580
|
}
|
569
|
581
|
}
|
570
|
582
|
|
|
583
|
+ /**
|
|
584
|
+ * Get name to display for channelClient (Taking into account the channelmodeprefix setting).
|
|
585
|
+ *
|
|
586
|
+ * @param channelClient The client to get the display name for
|
|
587
|
+ * @param overrideNick Nickname to display instead of real nickname
|
|
588
|
+ *
|
|
589
|
+ * @return name to display
|
|
590
|
+ */
|
|
591
|
+ protected String getDisplayName(final GroupChatUser channelClient, final String overrideNick) {
|
|
592
|
+ if (channelClient == null) {
|
|
593
|
+ return overrideNick.isEmpty() ? "Unknown Client" : overrideNick;
|
|
594
|
+ } else if (overrideNick.isEmpty()) {
|
|
595
|
+ return channelmodeprefix ? channelClient.toString() : channelClient.getNickname();
|
|
596
|
+ } else {
|
|
597
|
+ return channelmodeprefix ? channelClient.getImportantMode() + overrideNick :
|
|
598
|
+ overrideNick;
|
|
599
|
+ }
|
|
600
|
+ }
|
|
601
|
+
|
571
|
602
|
/**
|
572
|
603
|
* Shows the history window for the specified target, if available.
|
573
|
604
|
*
|