Browse Source

Document and fix Channel.getDetails

pull/310/head
Greg Holmes 9 years ago
parent
commit
0dbf0caa26
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      src/com/dmdirc/Channel.java

+ 6
- 3
src/com/dmdirc/Channel.java View File

@@ -411,6 +411,11 @@ public class Channel extends MessageTarget implements GroupChat {
411 411
     /**
412 412
      * Returns a string[] containing the nickname/ident/host of a channel client.
413 413
      *
414
+     * 0 - mode
415
+     * 1 - nickname
416
+     * 2 - ident
417
+     * 3 - hostname
418
+     *
414 419
      * @param client The channel client to check
415 420
      *
416 421
      * @return A string[] containing displayable components
@@ -434,11 +439,9 @@ public class Channel extends MessageTarget implements GroupChat {
434 439
             final Optional<Colour> background
435 440
                     = client.getDisplayProperty(DisplayProperty.BACKGROUND_COLOUR);
436 441
             if (foreground.isPresent()) {
437
-                final String prefix;
442
+                String prefix = Styliser.CODE_HEXCOLOUR + ColourUtils.getHex(foreground.get());
438 443
                 if (background.isPresent()) {
439 444
                     prefix = ',' + ColourUtils.getHex(background.get());
440
-                } else {
441
-                    prefix = Styliser.CODE_HEXCOLOUR + ColourUtils.getHex(foreground.get());
442 445
                 }
443 446
                 res[1] = prefix + res[1] + Styliser.CODE_HEXCOLOUR;
444 447
             }

Loading…
Cancel
Save