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.
This commit is contained in:
parent
8d91e92168
commit
2d914b2114
|
@ -58,7 +58,6 @@ namespace ChatSharp
|
||||||
if (!Channels.Contains(channel))
|
if (!Channels.Contains(channel))
|
||||||
throw new InvalidOperationException("Client is not present in channel.");
|
throw new InvalidOperationException("Client is not present in channel.");
|
||||||
SendRawMessage("PART {0}", channel);
|
SendRawMessage("PART {0}", channel);
|
||||||
Channels.Remove(Channels[channel]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -69,7 +68,6 @@ namespace ChatSharp
|
||||||
if (!Channels.Contains(channel))
|
if (!Channels.Contains(channel))
|
||||||
throw new InvalidOperationException("Client is not present in channel.");
|
throw new InvalidOperationException("Client is not present in channel.");
|
||||||
SendRawMessage("PART {0} :{1}", channel, reason);
|
SendRawMessage("PART {0} :{1}", channel, reason);
|
||||||
Channels.Remove(Channels[channel]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue