Added some trace logging + TODO item.

fix-message-formatting
Danny van Heumen 12 years ago
parent c1f13e0cf2
commit 6b8367b050

@ -283,6 +283,8 @@ public void disconnect()
if (this.connectionState == null && this.irc == null) if (this.connectionState == null && this.irc == null)
return; return;
// TODO Handle aborting joining attempts registered in this.joining.
synchronized (this.joined) synchronized (this.joined)
{ {
// Leave all joined channels. // Leave all joined channels.
@ -842,7 +844,10 @@ public void onServerNumericMessage(ServerNumericMessage msg)
Integer code = msg.getNumericCode(); Integer code = msg.getNumericCode();
if (code == null) if (code == null)
{
LOGGER.trace("No 'code' in numeric message event.");
return; return;
}
switch (code.intValue()) switch (code.intValue())
{ {
@ -851,7 +856,11 @@ public void onServerNumericMessage(ServerNumericMessage msg)
String channelName = text.substring(0, text.indexOf(' ')); String channelName = text.substring(0, text.indexOf(' '));
if (IrcStack.this.joining.containsKey(channelName) if (IrcStack.this.joining.containsKey(channelName)
|| IrcStack.this.joined.containsKey(channelName)) || IrcStack.this.joined.containsKey(channelName))
{
LOGGER.trace("Chat room join event was announced. Stop "
+ "handling this event.");
break; break;
}
// We aren't currently attempting to join, so this join is // We aren't currently attempting to join, so this join is
// unannounced. // unannounced.
LOGGER.trace("Starting unannounced join of chat room '" LOGGER.trace("Starting unannounced join of chat room '"
@ -873,6 +882,10 @@ public void onServerNumericMessage(ServerNumericMessage msg)
LOGGER.trace("Unannounced join of chat room '" + channelName LOGGER.trace("Unannounced join of chat room '" + channelName
+ "' completed."); + "' completed.");
break; break;
default:
LOGGER.trace("This ServerNumericMessage (" + code
+ ") will not be handled.");
break;
} }
} }

Loading…
Cancel
Save