Skip to content

Commit

Permalink
Don't add '0' to pendingJoins
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneMcC committed Mar 5, 2016
1 parent 108c542 commit 92c7350
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions irc/src/com/dmdirc/parser/irc/processors/ProcessJoin.java
Expand Up @@ -187,7 +187,7 @@ public void process(final String sParam, final String... token) {
iChannel.setInternalPassword(pendingJoin.getKey());
} else {
// Out of sync, clear
callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: pending join keys out of sync (Got: " + pendingJoin.getChannel() + ", Wanted: " + channelName + ") - Clearing.");
callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: pending join keys out of sync (Got: " + (pendingJoin == null ? pendingJoin : pendingJoin.getChannel()) + ", Wanted: " + channelName + ") - Clearing.");
pendingJoins.clear();
}

Expand Down Expand Up @@ -220,7 +220,9 @@ public void handleDataOut(final IRCDataOutEvent event) {
// don't have guesses for channels we are already in.
for (final String chan : newLine[1].split(",")) {
final String key = keys.poll();
if (getChannel(chan) == null) {
if (chan.equals("0")) {
callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: Ignoring possible channel Key for part-all channel: " + chan + " -> " + key);
} else if (getChannel(chan) == null) {
callDebugInfo(IRCParser.DEBUG_INFO, "processJoin: Intercepted possible channel Key: " + chan + " -> " + key);
pendingJoins.add(new PendingJoin(chan, key));
} else {
Expand Down

0 comments on commit 92c7350

Please sign in to comment.