parent
d1424ba162
commit
f380779eba
|
@ -74,11 +74,16 @@ namespace ChatSharp
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Joins the specified channel.
|
/// Joins the specified channel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void JoinChannel(string channel)
|
public void JoinChannel(string channel, string key = null)
|
||||||
{
|
{
|
||||||
if (Channels.Contains(channel))
|
if (Channels.Contains(channel))
|
||||||
throw new InvalidOperationException("Client is not already present in channel.");
|
throw new InvalidOperationException("Client is already present in channel.");
|
||||||
SendRawMessage("JOIN {0}", channel);
|
|
||||||
|
string joinCmd = string.Format("JOIN {0}", channel);
|
||||||
|
if (!string.IsNullOrEmpty(key))
|
||||||
|
joinCmd += string.Format(" {0}", key);
|
||||||
|
|
||||||
|
SendRawMessage(joinCmd, channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue