Some extra checks for leave channel operation.

fix-message-formatting
Danny van Heumen 12 years ago
parent bfd64b14ba
commit 9201294faf

@ -212,6 +212,8 @@ public void onFailure(Exception e)
// if connecting succeeded, set state to registered
this.provider.setCurrentRegistrationState(
RegistrationState.REGISTERED);
// TODO Check and handle actual nick name used in connection
// in case one of the alternate nick names was needed.
}
else
{
@ -690,7 +692,17 @@ public void leave(ChatRoomIrcImpl chatroom)
*/
private void leave(String chatRoomName)
{
this.irc.leaveChannel(chatRoomName);
if (this.connectionState == null || !this.connectionState.isConnected())
return;
try
{
this.irc.leaveChannel(chatRoomName);
}
catch (ApiException e)
{
LOGGER.warn("exception occurred while leaving channel", e);
}
}
public void banParticipant(ChatRoomIrcImpl chatroom, ChatRoomMember member,

Loading…
Cancel
Save