Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
242 changes: 0 additions & 242 deletions cmpctircd/Cloak.cs

This file was deleted.

15 changes: 15 additions & 0 deletions cmpctircd/Cloak/Cloak.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace cmpctircd.Cloak
{
/// <summary>
/// <see cref="Cloak"/> abstract class.
/// </summary>
public abstract class Cloak
{
/// <summary>
/// Gets a cloak string.
/// </summary>
/// <param name="cloakOptions">The client's cloaking parameters.</param>
/// <returns>A cloak string.</returns>
public abstract string GetCloakString(CloakOptions cloakOptions);
}
}
46 changes: 46 additions & 0 deletions cmpctircd/Cloak/CloakOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System.Net;

namespace cmpctircd.Cloak
{
/// <summary>
/// A class containing cloaking parameters from the client.
/// Use this instead of excess method arguments.
/// </summary>
public class CloakOptions
{
/// <summary>
/// Initializes a new instance of the <see cref="CloakOptions"/> class.
/// </summary>
/// <param name="host">The client's DNS host.</param>
/// <param name="ip">The client's IP Address.</param>
/// <param name="key">The server's cloak key.</param>
/// <param name="full">Full cloaking config option.</param>
public CloakOptions(string host, IPAddress ip, string key, bool full)
{
Host = host;
Ip = ip;
Key = key;
Full = full;
}

/// <summary>
/// Gets client's DNS host.
/// </summary>
public string Host { get; private set; }

/// <summary>
/// Gets client's IP Address.
/// </summary>
public IPAddress Ip { get; private set; }

/// <summary>
/// Gets server's cloak key.
/// </summary>
public string Key { get; private set; }

/// <summary>
/// Gets a value indicating whether full cloaking should occur.
/// </summary>
public bool Full { get; private set; }
}
}
Loading