Table of Contents

Class BridgeBanService

Namespace
FishMMO.DiscordBot.Services
Assembly
FishMMO-DiscordBot.dll

Manages bridge bans — prevents specific game characters or accounts from having their messages forwarded between Discord and the game.

public class BridgeBanService
Inheritance
BridgeBanService
Inherited Members

Constructors

BridgeBanService(BotConfigurationService, ILogger<BridgeBanService>)

Initializes a new instance of the BridgeBanService class.

public BridgeBanService(BotConfigurationService botConfigService, ILogger<BridgeBanService> logger)

Parameters

botConfigService BotConfigurationService
logger ILogger<BridgeBanService>

Methods

AddBridgeBan(string, bool, string, string)

Adds a bridge ban for the specified name.

public bool AddBridgeBan(string name, bool isAccountBan, string bannedBy, string reason)

Parameters

name string

The character or account name to ban.

isAccountBan bool

True if this bans an account name; false for character name.

bannedBy string

Who issued the ban.

reason string

Reason for the ban.

Returns

bool

True if the ban was added; false if already banned.

GetAllBans()

Returns all current bridge bans.

public IReadOnlyCollection<BridgeBanEntry> GetAllBans()

Returns

IReadOnlyCollection<BridgeBanEntry>

IsBridgeBanned(string?, string?)

Checks whether a character name or account name is bridge-banned.

public bool IsBridgeBanned(string? characterName, string? accountName)

Parameters

characterName string

The character name to check.

accountName string

The account name to check.

Returns

bool

True if either the character or account is bridge-banned.

RemoveBridgeBan(string)

Removes a bridge ban for the specified name.

public bool RemoveBridgeBan(string name)

Parameters

name string

The character or account name to unban.

Returns

bool

True if the ban was removed; false if not found.