|
@@ -585,7 +585,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
585
|
585
|
* @param args Formatting String Options
|
586
|
586
|
*/
|
587
|
587
|
public void callDebugInfo(final int level, final String data, final Object... args) {
|
588
|
|
- callDebugInfo(level, String.format(data, args));
|
|
588
|
+ callDebugInfo(level, args == null || args.length == 0 ? data : String.format(data, args));
|
589
|
589
|
}
|
590
|
590
|
|
591
|
591
|
/**
|
|
@@ -754,7 +754,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
754
|
754
|
}
|
755
|
755
|
|
756
|
756
|
resetState();
|
757
|
|
- callDebugInfo(DEBUG_SOCKET, "Connecting to " + getURI().getHost() + ':' + getURI().getPort());
|
|
757
|
+ callDebugInfo(DEBUG_SOCKET, "Connecting to %s:%s", getURI().getHost(), getURI().getPort());
|
758
|
758
|
|
759
|
759
|
currentSocketState = SocketState.OPENING;
|
760
|
760
|
|
|
@@ -823,7 +823,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
823
|
823
|
* @param isUserError Is this a user error?
|
824
|
824
|
*/
|
825
|
825
|
private void handleConnectException(final Exception e, final boolean isUserError) {
|
826
|
|
- callDebugInfo(DEBUG_SOCKET, "Error Connecting (" + e.getMessage() + "), Aborted");
|
|
826
|
+ callDebugInfo(DEBUG_SOCKET, "Error Connecting (%s), Aborted", e.getMessage());
|
827
|
827
|
final ParserError ei = new ParserError(
|
828
|
828
|
ParserError.ERROR_ERROR + (isUserError ? ParserError.ERROR_USER : 0),
|
829
|
829
|
"Exception with server socket", getLastLine());
|
|
@@ -877,7 +877,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
877
|
877
|
processLine(lastLine);
|
878
|
878
|
}
|
879
|
879
|
} catch (IOException e) {
|
880
|
|
- callDebugInfo(DEBUG_SOCKET, "Exception in main loop (" + e.getMessage() + "), Aborted");
|
|
880
|
+ callDebugInfo(DEBUG_SOCKET, "Exception in main loop (%s), Aborted", e.getMessage());
|
881
|
881
|
|
882
|
882
|
if (currentSocketState != SocketState.CLOSED) {
|
883
|
883
|
currentSocketState = SocketState.CLOSED;
|
|
@@ -1084,7 +1084,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
1084
|
1084
|
final Queue<Character> listModeQueue = channel.getListModeQueue();
|
1085
|
1085
|
for (int i = 0; i < newLine[2].length(); ++i) {
|
1086
|
1086
|
final Character mode = newLine[2].charAt(i);
|
1087
|
|
- callDebugInfo(DEBUG_LMQ, "Intercepted mode request for " + channel + " for mode " + mode);
|
|
1087
|
+ callDebugInfo(DEBUG_LMQ, "Intercepted mode request for %s for mode %s", channel, mode);
|
1088
|
1088
|
if (chanModesOther.containsKey(mode) && chanModesOther.get(mode) == MODE_LIST) {
|
1089
|
1089
|
if (foundModes.contains(mode)) {
|
1090
|
1090
|
callDebugInfo(DEBUG_LMQ, "Already added to LMQ");
|
|
@@ -1650,7 +1650,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
1650
|
1650
|
// MAXLIST=bdeI:50
|
1651
|
1651
|
// MAXLIST=b:60,e:60,I:60
|
1652
|
1652
|
// MAXBANS=30
|
1653
|
|
- callDebugInfo(DEBUG_INFO, "Looking for maxlistmodes for: " + mode);
|
|
1653
|
+ callDebugInfo(DEBUG_INFO, "Looking for maxlistmodes for: %s", mode);
|
1654
|
1654
|
// Try in MAXLIST
|
1655
|
1655
|
int result = -2;
|
1656
|
1656
|
if (h005Info.get(IrcConstants.ISUPPORT_MAXIMUM_LIST_MODES) != null) {
|
|
@@ -1658,15 +1658,13 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
1658
|
1658
|
result = 0;
|
1659
|
1659
|
}
|
1660
|
1660
|
final String maxlist = h005Info.get(IrcConstants.ISUPPORT_MAXIMUM_LIST_MODES);
|
1661
|
|
- callDebugInfo(DEBUG_INFO, "Found maxlist (" + maxlist + ')');
|
|
1661
|
+ callDebugInfo(DEBUG_INFO, "Found maxlist (%s)", maxlist);
|
1662
|
1662
|
final String[] bits = maxlist.split(",");
|
1663
|
1663
|
for (String bit : bits) {
|
1664
|
1664
|
final String[] parts = bit.split(":", 2);
|
1665
|
|
- callDebugInfo(DEBUG_INFO, "Bit: " + bit + " | parts.length = " + parts.length + " ("
|
1666
|
|
- + parts[0] + " -> " + parts[0].indexOf(mode) + ')');
|
|
1665
|
+ callDebugInfo(DEBUG_INFO, "Bit: %s | parts.length = %s (%s -> %s)", bit, parts.length, parts[0], parts[0].indexOf(mode));
|
1667
|
1666
|
if (parts.length == 2 && parts[0].indexOf(mode) > -1) {
|
1668
|
|
- callDebugInfo(DEBUG_INFO, "parts[0] = '" + parts[0] + "' | parts[1] = '"
|
1669
|
|
- + parts[1] + '\'');
|
|
1667
|
+ callDebugInfo(DEBUG_INFO, "parts[0] = '%s' | parts[1] = '%s'", parts[0], parts[1]);
|
1670
|
1668
|
try {
|
1671
|
1669
|
result = Integer.parseInt(parts[1]);
|
1672
|
1670
|
break;
|
|
@@ -1694,7 +1692,7 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
|
1694
|
1692
|
callDebugInfo(DEBUG_INFO, "Failed");
|
1695
|
1693
|
callErrorInfo(new ParserError(ParserError.ERROR_ERROR + ParserError.ERROR_USER, "Unable to discover max list modes.", getLastLine()));
|
1696
|
1694
|
}
|
1697
|
|
- callDebugInfo(DEBUG_INFO, "Result: " + result);
|
|
1695
|
+ callDebugInfo(DEBUG_INFO, "Result: %s", result);
|
1698
|
1696
|
return result;
|
1699
|
1697
|
}
|
1700
|
1698
|
|