Browse Source

Don't add '0' to pendingJoins

pull/116/head
Shane Mc Cormack 8 years ago
parent
commit
92c73501f3
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      irc/src/com/dmdirc/parser/irc/processors/ProcessJoin.java

+ 4
- 2
irc/src/com/dmdirc/parser/irc/processors/ProcessJoin.java View File

@@ -187,7 +187,7 @@ public class ProcessJoin extends IRCProcessor {
187 187
                 iChannel.setInternalPassword(pendingJoin.getKey());
188 188
             } else {
189 189
                 // Out of sync, clear
190
-                callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: pending join keys out of sync (Got: " + pendingJoin.getChannel() + ", Wanted: " + channelName + ") - Clearing.");
190
+                callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: pending join keys out of sync (Got: " + (pendingJoin == null ? pendingJoin : pendingJoin.getChannel()) + ", Wanted: " + channelName + ") - Clearing.");
191 191
                 pendingJoins.clear();
192 192
             }
193 193
 
@@ -220,7 +220,9 @@ public class ProcessJoin extends IRCProcessor {
220 220
             // don't have guesses for channels we are already in.
221 221
             for (final String chan : newLine[1].split(",")) {
222 222
                 final String key = keys.poll();
223
-                if (getChannel(chan) == null) {
223
+                if (chan.equals("0")) {
224
+                    callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: Ignoring possible channel Key for part-all channel: " + chan + " -> " + key);
225
+                } else if (getChannel(chan) == null) {
224 226
                     callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: Intercepted possible channel Key: " + chan + " -> " + key);
225 227
                     pendingJoins.add(new PendingJoin(chan, key));
226 228
                 } else {

Loading…
Cancel
Save