Browse Source

These changes were supposed to be commited!

Change-Id: I86aa3ddec879e915001c8833ddc6187109333463
Reviewed-on: http://gerrit.dmdirc.com/399
Reviewed-by: Gregory Holmes <greboid@dmdirc.com>
Tested-by: Gregory Holmes <greboid@dmdirc.com>
tags/0.6.3
Shane Mc Cormack 14 years ago
parent
commit
1d681e5897
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      src/com/dmdirc/parser/irc/IRCParser.java

+ 7
- 4
src/com/dmdirc/parser/irc/IRCParser.java View File

@@ -1495,13 +1495,16 @@ public class IRCParser implements SecureParser, Runnable {
1495 1495
 
1496 1496
             // Make sure we have a list to put stuff in.
1497 1497
             StringBuffer list = joinMap.get(thisKey);
1498
-            if (list == null) { list = new StringBuffer(); }
1498
+            if (list == null) {
1499
+                list = new StringBuffer();
1500
+                joinMap.put(thisKey, list);
1501
+            }
1499 1502
 
1500 1503
             // Add the channel to the list. If the name is invalid and
1501 1504
             // autoprefix is off we will just skip this channel.
1502
-            if (isValidChannelName(channelName) || autoPrefix) {
1505
+            if (channelName.length() > 0 && (isValidChannelName(channelName) || autoPrefix)) {
1503 1506
                 if (list.length() > 0) { list.append(","); }
1504
-                if (autoPrefix) {
1507
+                if (!isValidChannelName(channelName) && autoPrefix) {
1505 1508
                     if (h005Info.containsKey("CHANTYPES")) {
1506 1509
                         final String chantypes = h005Info.get("CHANTYPES");
1507 1510
                         if (chantypes.isEmpty()) {
@@ -1513,7 +1516,7 @@ public class IRCParser implements SecureParser, Runnable {
1513 1516
                         list.append('#');
1514 1517
                     }
1515 1518
                 }
1516
-                list.append(channel);
1519
+                list.append(channelName);
1517 1520
             }
1518 1521
         }
1519 1522
 

Loading…
Cancel
Save