From 2d914b211458466a17300404c853a65e12ed87f2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliveira Date: Fri, 25 Aug 2017 19:44:07 -0300 Subject: [PATCH] Don't remove channel from client channel list when parting it If we have a logic that handles user parts, leave parts to be handled by this logic. Removing the channel before letting ChatSharp parse parts make it so a user cannot join the same channel after parting it. --- ChatSharp/IrcClient.Commands.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/ChatSharp/IrcClient.Commands.cs b/ChatSharp/IrcClient.Commands.cs index 36551e0..e0f8850 100644 --- a/ChatSharp/IrcClient.Commands.cs +++ b/ChatSharp/IrcClient.Commands.cs @@ -58,7 +58,6 @@ namespace ChatSharp if (!Channels.Contains(channel)) throw new InvalidOperationException("Client is not present in channel."); SendRawMessage("PART {0}", channel); - Channels.Remove(Channels[channel]); } /// @@ -69,7 +68,6 @@ namespace ChatSharp if (!Channels.Contains(channel)) throw new InvalidOperationException("Client is not present in channel."); SendRawMessage("PART {0} :{1}", channel, reason); - Channels.Remove(Channels[channel]); } ///