ChannelMembership

- Added reply facilities
This commit is contained in:
Tristan B. Velloza Kildaire 2023-11-17 17:49:17 +02:00
parent 420cf24db0
commit 33b455fa35
1 changed files with 34 additions and 0 deletions

View File

@ -122,11 +122,18 @@ public enum MembershipMode
LIST
}
public enum MemershipResult
{
GOOD,
BAD
}
public class ChannelMembership : Command
{
private MembershipMode memMode;
private string channel;
private string[] members;
private MemershipResult status;
this()
{
@ -149,4 +156,31 @@ public class ChannelMembership : Command
this.memMode = mode;
return this;
}
public ChannelMembership listReplyGood(string[] channels)
{
// Set the status to good
replyGood();
// Set the channels
this.members = channels;
return this;
}
public ChannelMembership replyGood()
{
return replyStatus(MemershipResult.GOOD);
}
public ChannelMembership replyBad()
{
return replyStatus(MemershipResult.BAD);
}
private ChannelMembership replyStatus(MemershipResult result)
{
this.status = result;
return this;
}
}